DatasetStore#
- class DatasetStore(*args)#
Bases:
MutableMapping[str,_V]Mapping of registered Datasets.
Datasets classes are stored using their unique ID, or SHORTNAME if not defined. They can be retrieved using ID or SHORTNAME, as preferred.
- Parameters:
args (_V | str)
- __getitem__(key)#
Return DataManagerBase subclass with this ID or SHORTNAME.
Import the dataset if registered as an import string.
- Parameters:
key (str)
- Return type:
_V
- __setitem__(key, value)#
Automatically adds shortcuts if value is a Dataset.
- __weakref__#
list of weak references to the object
- add(ds, name=None)#
Register a Dataset subclass.
Will register it under: - name if supplied -
Dataset.IDif defined -Dataset.SHORTNAMEif definedIf the SHORTNAME attribute is defined, an alias will be stored in
DatasetStore.shortnames, and the dataset can either be accessed with its ID or shortname.
- get_no_import(key)#
Retrieve dataset without importing it if a string.
- register(name=None)#
Decorator to register a dataset.