yaw.core.abc.HDFSerializable#
- class yaw.core.abc.HDFSerializable[source]#
Bases:
ABCBase class for an object that can be serialised into a HDF5 file.
Methods
__init__()from_file(path)Create a class instance by deserialising data from a HDF5 file.
from_hdf(source)Create a class instance by deserialising data from a HDF5 group.
to_file(path)Serialise the class instance to a new HDF5 file.
to_hdf(dest)Serialise the class instance into an existing HDF5 group.
- classmethod from_file(path: TypePathStr) _Thdf[source]#
Create a class instance by deserialising data from a HDF5 file.
- Parameters:
path (
pathlib.Path,str) – Group in an opened HDF5 file that contains the necessary data.- Returns:
- abstract classmethod from_hdf(source: Group) _Thdf[source]#
Create a class instance by deserialising data from a HDF5 group.
- Parameters:
source (
h5py.Group) – Group in an opened HDF5 file that contains the serialised data.- Returns:
HDFSerializablep