DataHandler
Defines a general data loader class that we can use for AtomData and any other data classes we might find useful.
__init__(self, data_name, data_key=None, source_key=None, data_dir=None, data_pkg=None, alternate_keys=None, getter=None, record_type=None):
data_name:strthe name of the dataset
data_key:str | Nonethe key in the loaded dictionary to use for the actual data (
"data"by default)source_key:str | Nonethe key in the loaded dictionary for the original data source (
"source"by default)data_dir:str | Nonethe main directory data will be loaded from (
.by default)data_pkg:str | Nonethe python package to load (
TheRealMcCoyby default)alternate_keys:Iterable[str] | Nonealternate keys that can be used to index into the dataset which can will be populated at runtime
getter:callable | Nonea function to use to resolve a key
record_type:type | Nonethe class to use for holding data (
DataRecordby default)
@property
data_file(self):
load(self, env=None):
Actually loads the data from data_file.
Currently set up to just use an import statement but should
be reimplemented to use a Deserializer from Scaffolding.Serializers
:returns:_
@property
data(self):
@property
source(self):
__getitem__(self, key):
__len__(self):
__iter__(self):
__getstate__(self):
__setstate__(self, state):
__repr__(self):