sequince.utils.hdf5#

HDF5 storage and logical-schema helpers for Sequince.

Attributes#

Functions#

schema_header(kind, *[, include_version])

Build the common logical header for a Sequince HDF5 payload.

validate_schema(payload, *, kinds, required[, optional])

Validate the common header and fields of a logical HDF5 payload.

nested(payload)

Remove root-only producer information from a nested domain payload.

recursively_save_to_h5_file(h5_file_or_group, path, ...)

Save a portable mapping below an open HDF5 file or group.

load_from_h5_file(h5_file_or_group, path)

Load a portable mapping below an open HDF5 file or group.

Module Contents#

sequince.utils.hdf5.SCHEMA_VERSION = 1#
sequince.utils.hdf5.KIND_KEY = '_sequince_kind'#
sequince.utils.hdf5.SCHEMA_KEY = '_sequince_schema_version'#
sequince.utils.hdf5.VERSION_KEY = '_sequince_version'#
sequince.utils.hdf5.schema_header(kind, *, include_version=True)#

Build the common logical header for a Sequince HDF5 payload.

Parameters:
  • kind (str)

  • include_version (bool)

Return type:

dict[str, Any]

sequince.utils.hdf5.validate_schema(payload, *, kinds, required, optional=frozenset())#

Validate the common header and fields of a logical HDF5 payload.

Parameters:
Return type:

str

sequince.utils.hdf5.nested(payload)#

Remove root-only producer information from a nested domain payload.

Parameters:

payload (dict[str, Any])

Return type:

dict[str, Any]

sequince.utils.hdf5.recursively_save_to_h5_file(h5_file_or_group, path, dictionary)#

Save a portable mapping below an open HDF5 file or group.

Parameters:
Return type:

None

sequince.utils.hdf5.load_from_h5_file(h5_file_or_group, path)#

Load a portable mapping below an open HDF5 file or group.

Parameters:
  • h5_file_or_group (Any)

  • path (str)

Return type:

dict[str, Any]