dsss.store#
Storage of SDMX artefacts.
Store facilitates use of keys derived from the SDMX Information Model and its
class hierarchy. Any artefact handled by key() can be stored or retrieved,
including:
Any
MaintainableArtefact.Any
BaseDataSetorBaseMetadataSet. This includes thesdmx.model.v21andsdmx.model.v30subclasses of Base(Meta)DataSet.
…using standard ‘CRUD’ operations, following the semantics of Python dict:
In general, for set() and update() operations, it is not necessary to
explicitly give the key; one is computed from the object to be stored, and returned.
Convenience methods are also provided, including assign_version(), list(),
list_versions(), resolve(), update_from().
Store is abstract with respect to how artefacts are stored. Subclasses may use
different methods of storage. Concrete subclasses include
DictStore, FlatFileStore, StructuredFileStore,
GitStore, and UnionStore.
Module data
Regular expression matching keys for (Meta)DataSet. |
- dsss.store.DATA_KEY_PATTERN = re.compile('(meta|)data-(?P<agency>[^:]+):(?P<id>[^-]+)-(?P<hash>.+)')#
Regular expression matching keys for (Meta)DataSet.
Functions
|
Return a ‘kind’ for a |
Recursively generate a hashable collection from obj. |
- dsss.store.dataset_kind(klass: type) Literal['data', 'metadata']#
Return a ‘kind’ for a
BaseDataSetorBaseMetadataSettype.
- dsss.store.hashable_metadata(obj) Tuple | str#
- dsss.store.hashable_metadata(obj: MetadataSet)
- dsss.store.hashable_metadata(obj: MetadataReport)
- dsss.store.hashable_metadata(obj: ReportedAttribute)
- dsss.store.hashable_metadata(obj: MetadataSet)
- dsss.store.hashable_metadata(obj: _Element)
- dsss.store.hashable_metadata(obj: str)
Recursively generate a hashable collection from obj.
Classes
|
|
|
|
|
Abstract class for a store using SDMX-ML files in a local directory. |
|
FileStore as a flat collection of files, with names identical to keys. |
|
A store that uses an underlying Git repository. |
|
Abstract class for key-value storage of SDMX artefacts. |
|
FileStore arranged in directories by maintainer, with more readable names. |
|
A Store that unites 1 or more underlying Stores. |