Skip to content

Commit f0b50ec

Browse files
feat: export StorageAdapter and get_storage_adapter at top level
The Storage Adapter spec (datajoint-docs#172) documents ``dj.StorageAdapter`` as the public base class and ``dj.get_storage_adapter()`` as the lookup helper, but they were not exposed via the top-level namespace in 2.2.3 — plugin authors following the spec literally hit ``AttributeError: module 'datajoint' has no attribute 'StorageAdapter'``. Adds the two public symbols to ``__init__.py``: - ``StorageAdapter`` (ABC, defined in ``src/datajoint/storage_adapter.py``) - ``get_storage_adapter(protocol)`` The private ``_discover_adapters`` helper is intentionally not exported.
1 parent 72cf607 commit f0b50ec

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/datajoint/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151
"get_codec",
5252
"ObjectRef",
5353
"NpyRef",
54+
# Storage Adapter API
55+
"StorageAdapter",
56+
"get_storage_adapter",
5457
# Other
5558
"errors",
5659
"migrate",
@@ -82,6 +85,7 @@
8285
from .instance import Instance, _ConfigProxy, _get_singleton_connection, _global_config, _check_thread_safe
8386
from .logging import logger
8487
from .objectref import ObjectRef
88+
from .storage_adapter import StorageAdapter, get_storage_adapter
8589
from .schemas import _Schema, VirtualModule, list_schemas, virtual_schema
8690
from .autopopulate import AutoPopulate
8791
from .jobs import Job

0 commit comments

Comments
 (0)