Object Storage
Python Sequential ObjectStore
stores
data in the standard python dict.
- class unidist.core.backends.pyseq.core.object_store.ObjectStore
Class that stores objects and provides access to these.
- get(data_ids)
Get object(s) associated with data_ids from the internal dictionary.
- Parameters:
data_ids (unidist.core.backends.common.data_id.DataID or list) – ID(s) of object(s) to get data from.
- Returns:
A Python object.
- Return type:
object
- classmethod get_instance()
Get instance of
ObjectStore
.
- put(data, data_id=None)
Put data to internal dictionary.
- Parameters:
data (object) – Data to be put.
data_id (unidist.core.backends.common.data_id.DataID, optional) – An ID of data. If it isn’t provided, will be created automatically.
- Returns:
An ID of object in internal dictionary.
- Return type: