file_format#

caput.pipeline.extensions.file_format(default=None)[source]#

Property type that accepts only “zarr”, or “hdf5”.

Returns a Property providing the selected FileFormat subclass or HDF5 if no value is specified.

Parameters:
default{“hdf5”, “zarr”} | FileFormat | None, optional

The default value for the Property. Only “zarr” or “hdf5” are supported options as strings, but a FileFormat subclass is also allowed, or None.

Returns:
propProperty

A property instance set up to validate a file format.

Raises:
CaputConfigError

If the default value is not “hdf5” or “zarr”.

Examples

Should be used like:

class Project:
    mode = file_format(default="zarr")