solidipes.loaders.data_container module
- class solidipes.loaders.data_container.DataContainer(initial_data={}, name=None, unique_identifier=None, **kwargs)[source]
Bases:
objectContainer class for other structured data containers
- _data_collection
Dictionary of other DataContainer or arbitrary objects. Set entry to “None” to mark as loadable.
- _has_native_attr(key)[source]
Check if attribute is present, outside of _data_collection, without using __getattr__
- compatible_viewers: list[Type[Viewer]]
List of compatible Viewer classes. Optionally override this in subclasses. Ideally, update it with self.compatible_viewers[:0] = [new_viewer_class, …]
- property data
Load all data if necessary and return it
Accessing this property for the first time will load the data. If self.__loaded_data has only one entry, returns it directly.
Override the _load_data method in subclasses to define how data is loaded or built using other data containers.
- property data_info
Returns a multi-line string with information about data keys
- errors
stores the error messages during loading