hdf5storage.Marshallers

Module for the classes to marshall Python types to/from file.

The marshallers have the following inheritance diagram

digraph inheritance8ec054b526 { rankdir=LR; size="8.0, 12.0"; "NumpyDtypeMarshaller" [URL="#hdf5storage.Marshallers.NumpyDtypeMarshaller",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; "NumpyScalarArrayMarshaller" -> "NumpyDtypeMarshaller" [arrowsize=0.5,style="setlinewidth(0.5)"]; "NumpyScalarArrayMarshaller" [URL="#hdf5storage.Marshallers.NumpyScalarArrayMarshaller",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; "TypeMarshaller" -> "NumpyScalarArrayMarshaller" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PythonChainMapMarshaller" [URL="#hdf5storage.Marshallers.PythonChainMapMarshaller",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; "PythonListMarshaller" -> "PythonChainMapMarshaller" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PythonCounterMarshaller" [URL="#hdf5storage.Marshallers.PythonCounterMarshaller",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; "PythonDictMarshaller" -> "PythonCounterMarshaller" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PythonDatetimeObjsMarshaller" [URL="#hdf5storage.Marshallers.PythonDatetimeObjsMarshaller",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; "PythonDictMarshaller" -> "PythonDatetimeObjsMarshaller" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PythonDictMarshaller" [URL="#hdf5storage.Marshallers.PythonDictMarshaller",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; "TypeMarshaller" -> "PythonDictMarshaller" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PythonFractionMarshaller" [URL="#hdf5storage.Marshallers.PythonFractionMarshaller",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; "PythonDictMarshaller" -> "PythonFractionMarshaller" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PythonListMarshaller" [URL="#hdf5storage.Marshallers.PythonListMarshaller",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; "NumpyScalarArrayMarshaller" -> "PythonListMarshaller" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PythonNoneEllipsisNotImplementedMarshaller" [URL="#hdf5storage.Marshallers.PythonNoneEllipsisNotImplementedMarshaller",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; "NumpyScalarArrayMarshaller" -> "PythonNoneEllipsisNotImplementedMarshaller" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PythonScalarMarshaller" [URL="#hdf5storage.Marshallers.PythonScalarMarshaller",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; "NumpyScalarArrayMarshaller" -> "PythonScalarMarshaller" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PythonSliceRangeMarshaller" [URL="#hdf5storage.Marshallers.PythonSliceRangeMarshaller",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; "PythonDictMarshaller" -> "PythonSliceRangeMarshaller" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PythonStringMarshaller" [URL="#hdf5storage.Marshallers.PythonStringMarshaller",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; "NumpyScalarArrayMarshaller" -> "PythonStringMarshaller" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PythonTupleSetDequeMarshaller" [URL="#hdf5storage.Marshallers.PythonTupleSetDequeMarshaller",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; "PythonListMarshaller" -> "PythonTupleSetDequeMarshaller" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TypeMarshaller" [URL="#hdf5storage.Marshallers.TypeMarshaller",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Base class for marshallers of Python types."]; }

TypeMarshaller()

Base class for marshallers of Python types.

NumpyScalarArrayMarshaller()

NumpyDtypeMarshaller()

PythonScalarMarshaller()

PythonStringMarshaller()

PythonNoneEllipsisNotImplementedMarshaller()

PythonDictMarshaller()

PythonCounterMarshaller()

PythonSliceRangeMarshaller()

PythonDatetimeObjsMarshaller()

PythonFractionMarshaller()

PythonListMarshaller()

PythonTupleSetDequeMarshaller()

PythonChainMapMarshaller()

TypeMarshaller

class hdf5storage.Marshallers.TypeMarshaller[source]

Bases: object

Base class for marshallers of Python types.

Base class providing the class interface for marshallers of Python types to/from disk. All marshallers must inherit from this class and override some of its methods and attributes. Just replicating its functionality is not enough. This includes several attributes that are needed in order for reading/writing methods to know if it is the appropriate marshaller to use and methods to actually do the reading and writing.

Marshallers are supported for types whose modules/packages may not be present (only guaranteed modules/packages are the Python runtime, numpy, and h5py). Obviously, if such a type is run into for writing, the needed modules are there. However, if such a type is found in a file for reading, it still needs to be read regardless of whether the required modules are present or not. If the required modules are there, the data will be read accurately using the read method. However, if one or more of the required modules are missing, the data will be read approximately/inaccurately using the read_approximate method is used, which must return an approximation of the data utilizing standard Python types or numpy types. A good example of a situation where this would be needed would be reading back a scipy sparse type when scipy is not present and thus it must be approximated (say, a conversion to a dense array or just the fields specifying it in a dict). Note that for types not in the main Python runtime or numpy, their types in types must be specified in str form including module. For example, collections.deque is 'collections.deque'.

Whether the marshaller can read types accurately with read or approximately with read_approximate is determined by whether the parent modules in required_parent_modules is/are present or not. If read is called, all the modules in required_modules will be loaded first (no additional latency). The read method must locally load the modules, though, in order to use them.

Note that it may be convenient for a marshaller that handles types in the main Python runtime but in modules that are rather large to use specify their types as str in types and put the required modules in required_parent_modules to not load those modules unless they are necessary - lazy loading essentially.

Subclasses should run this class’s __init__() first thing, set all attributes except type_to_typestring and typestring_to_type appropriately, and then call update_type_lookups() to set the two previous attributes. Inheritance information is in the Notes section of each method. Generally, read, write, and write_metadata need to be overridden and the different attributes set to the proper values. read_approximate needs to be overridden for marshallers meant to handle types not from the main Python runtime and not from numpy.

For marshalling types that are containers of other data, one will need to appropriate read/write them with the lowlevel functions utilities.read_data and utilities.write_data.

Changed in version 0.2: All marshallers must now inherit from this class.

Changed in version 0.2: Attributes were added, read_approximate was added, call signatures of the methods, and the initialization procedure were changed.

Warning

Marshallers for version 0.1.x of this package are not compatible with version 0.2.x.

Variables
  • required_parent_modules (tuple of str) – The parent modules required for reading types accurately.

  • required_modules (tuple of str) – The modules required to be loaded for reading types accurately.

  • python_attributes (set of str) – Attributes used to store type information.

  • matlab_attributes (set of str) – Attributes used for MATLAB compatibility.

  • types (tuple of types) – Types the marshaller can work on, which can be the actual classes themselves or their str representation such as 'collections.deque'.

  • python_type_strings (tuple of str) – Type strings of readable types.

  • matlab_classes (tuple of str) – Readable MATLAB classes.

  • type_to_typestring (dict) – Lookup using the types in types as keys and the matching entries in python_type_strings as values. Set using update_type_lookups.

  • typestring_to_type (dict) – Lookup using the type strings in python_type_strings as keys and the matching entries in types as values. Set using update_type_lookups.

See also

hdf5storage.Options, h5py.Dataset, h5py.Group, h5py.AttributeManager, hdf5storage.utilities.read_data, hdf5storage.utilities.write_data

required_parent_modules = ()

Parent modules required to accurately read types.

tuple of str

The names of the parent modules required to accurately read the types handled by this marshaller. This tuple is used to determine whether they can be read accurately, or innaccurately due to missing the needed modules. Modules in the main Python runtime and numpy do not need to be included (they are assumed to be present). The default is [].

New in version 0.2.

required_modules = ()

All required modules for reading the types accurately.

tuple of str

The modules (and submodules) that need to be loaded, in order, to be able to read the types handled by this marshaller accurately. All of the modules in required_parent_modules must be included. Modules in the main Python runtime and numpy do not need to be included (they are assumed to be present). The default is [].

New in version 0.2.

python_attributes = {'Python.Type'}

Attributes used to store type information.

set of str

set of attribute names the marshaller uses when an Option.store_python_metadata is True.

matlab_attributes = {'H5PATH'}

Attributes used for MATLAB compatibility.

set of str

set of attribute names the marshaller uses when maintaing Matlab HDF5 based mat file compatibility (Option.matlab_compatible is True).

types = ()

Tuple of Python types that can be marshalled.

tuple of types or str

tuple of the types that the marshaller can marshall. They must all be the actual types gotten from type(data) or their str representation such as 'collections.deque'. Default value is [].

python_type_strings = ()

Type strings of readable types.

tuple of str

tuple of the str that the marshaller would put in the HDF5 attribute ‘Python.Type’ to identify the Python type to be able to read it back correctly. Default value is [].

matlab_classes = ()

MATLAB class strings of readable types.

tuple of str

tuple of the MATLAB class str that the marshaller can read into Python objects. Default value is [].

type_to_typestring = dict()

Type to typestring lookup.

dict

Lookup using the types in types as keys and the matching entries in python_type_strings as values. Set using update_type_lookups.

New in version 0.2.

typestring_to_type = dict()

Typestring to type lookup.

dict

Lookup using the type strings in python_type_strings as keys and the matching entries in types as values. Set using update_type_lookups.

New in version 0.2.

get_type_string(data, type_string)[source]

Gets type string.

Finds the type string for ‘data’ contained in python_type_strings using its type. Non-None ‘type_string` overrides whatever type string is looked up. The override makes it easier for subclasses to convert something that the parent marshaller can write to disk but still put the right type string in place).

Parameters
  • data (type to be marshalled) – The Python object that is being written to disk.

  • type_string (str or None) – If it is a str, it overrides any looked up type string. None means don’t override.

Returns

The type string associated with ‘data’. Will be ‘type_string’ if it is not None.

Return type

str

Notes

Subclasses probably do not need to override this method.

read(f, dsetgrp, attributes, options)[source]

Read a Python object from file.

Reads the data at dsetgrp and converts it to a Python object and returns it.

This method is called if the modules in required_parent_modules can be found. Otherwise, read_approximate is used instead.

Changed in version 0.2: Arguements changed.

Parameters
  • f (h5py.File) – The HDF5 file handle that is open.

  • dsetgrp (h5py.Dataset or h5py.Group) – The Dataset or Group object to read.

  • attributes (collections.defaultdict) – All the Attributes of dsetgrp with their names as keys and their values as values.

  • options (hdf5storage.core.Options) – hdf5storage options object.

Raises

NotImplementedError – If reading the object from file is currently not supported.

Returns

The Python object.

Return type

data

Notes

Must be overridden in a subclass because a NotImplementedError is thrown immediately.

read_approximate(f, dsetgrp, attributes, options)[source]

Read a Python object approximately from file.

Reads the data at dsetgrp and returns an approximation of it constructed from the types in the main Python runtime and numpy.

This method is called if the modules in required_parent_modules cannot be found. Otherwise, read is used instead.

New in version 0.2.

Parameters
  • f (h5py.File) – The HDF5 file handle that is open.

  • dsetgrp (h5py.Dataset or h5py.Group) – The Dataset or Group object to read.

  • attributes (collections.defaultdict) – All the Attributes of dsetgrp with their names as keys and their values as values.

  • options (hdf5storage.core.Options) – hdf5storage options object.

Raises

NotImplementedError – If reading the object from file is currently not supported.

Returns

The Python object.

Return type

data

Notes

Must be overridden in a subclass because a NotImplementedError is thrown immediately.

update_type_lookups()[source]

Update type and typestring lookup dicts.

Must be called once the types and python_type_strings attributes are set so that type_to_typestring and typestring_to_type are constructed.

New in version 0.2.

Notes

Subclasses need to call this function explicitly.

write(f, grp, name, data, type_string, options)[source]

Writes an object’s metadata to file.

Writes the Python object ‘data’ to ‘name’ in h5py.Group ‘grp’.

Changed in version 0.2: Arguements changed.

Changed in version 0.2: Added return value obj.

Parameters
  • f (h5py.File) – The HDF5 file handle that is open.

  • grp (h5py.Group or h5py.File) – The parent HDF5 Group (or File if at ‘/’) that contains the object with the specified name.

  • name (str) – Name of the object.

  • data – The object to write to file.

  • type_string (str or None) – The type string for data. If it is None, one will have to be gotten by get_type_string.

  • options (hdf5storage.core.Options) – hdf5storage options object.

Returns

obj – The base Dataset or Group having the name name in grp that was made, or None if nothing was written.

Return type

h5py.Dataset or h5py.Group or None

Raises

Notes

Must be overridden in a subclass because a NotImplementedError is thrown immediately.

write_metadata(f, dsetgrp, data, type_string, options, attributes=None)[source]

Writes an object to file.

Writes the metadata for a Python object data to file at name in h5py.Group grp. Metadata is written to HDF5 Attributes. Existing Attributes that are not being used are deleted.

Changed in version 0.2: Arguements changed.

Parameters
  • f (h5py.File) – The HDF5 file handle that is open.

  • dsetgrp (h5py.Dataset or h5py.Group) – The Dataset or Group object to add metadata to.

  • data – The object to write to file.

  • type_string (str or None) – The type string for data. If it is None, one will have to be gotten by get_type_string.

  • options (hdf5storage.core.Options) – hdf5storage options object.

  • attributes (dict or None, optional) – The Attributes to set. The keys (str) are the names. The values are tuple of the Attribute kind and the value to set. Valid kinds are 'string_array', 'string', and 'value'. The values must correspond to what set_attribute_string_array, set_attribute_string and set_attribute would take respectively. Default is no Attributes to set (None).

Notes

The attribute ‘Python.Type’ is set to the type string. All H5PY Attributes not in python_attributes and/or matlab_attributes (depending on the attributes of ‘options’) are deleted. These are needed functions for writting essentially any Python object, so subclasses should probably call the baseclass’s version of this function if they override it and just provide the additional functionality needed. This requires that the names of any additional HDF5 Attributes are put in the appropriate set.

See also

utilities.set_attributes_all()

NumpyScalarArrayMarshaller

class hdf5storage.Marshallers.NumpyScalarArrayMarshaller[source]

Bases: hdf5storage.Marshallers.TypeMarshaller

Handles the following

python_attributes = {'Python.Type', 'Python.Shape', 'Python.Empty',
                     'Python.numpy.UnderlyingType',
                     'Python.numpy.Container', 'Python.Fields'}

matlab_attributes = {'H5PATH', 'MATLAB_class', 'MATLAB_empty',
                     'MATLAB_int_decode', 'MATLAB_fields'}

types = (np.ndarray, np.matrix,
         np.chararray, np.core.records.recarray,
         np.bool_, np.void,
         np.uint8, np.uint16, np.uint32, np.uint64,
         np.int8, np.int16, np.int32, np.int64,
         np.float16, np.float32, np.float64,
         np.complex64, np.complex128,
         np.bytes_, np.str_, np.object_)

python_type_strings = ('numpy.ndarray', 'numpy.matrix',
                       'numpy.chararray', 'numpy.recarray',
                       'numpy.bool_', 'numpy.void',
                       'numpy.uint8', 'numpy.uint16',
                       'numpy.uint32', 'numpy.uint64', 'numpy.int8',
                       'numpy.int16', 'numpy.int32', 'numpy.int64',
                       'numpy.float16', 'numpy.float32', 'numpy.float64',
                       'numpy.complex64', 'numpy.complex128',
                       'numpy.bytes_', 'numpy.str_', 'numpy.object_')

matlab_classes = ('logical', 'char', 'single', 'double', 'uint8',
                  'uint16', 'uint32', 'uint64', 'int8', 'int16',
                  'int32', 'int64', 'cell', 'canonical empty')

NumpyDtypeMarshaller

class hdf5storage.Marshallers.NumpyDtypeMarshaller[source]

Bases: hdf5storage.Marshallers.NumpyScalarArrayMarshaller

Handles the following

python_attributes = {'Python.Type', 'Python.Shape', 'Python.Empty',
                     'Python.numpy.UnderlyingType',
                     'Python.numpy.Container', 'Python.Fields'}

matlab_attributes = {'H5PATH', 'MATLAB_class', 'MATLAB_empty',
                     'MATLAB_int_decode'}

types = (np.dtype, )

python_type_strings = ('numpy.dtype', )

matlab_classes = ()

PythonScalarMarshaller

class hdf5storage.Marshallers.PythonScalarMarshaller[source]

Bases: hdf5storage.Marshallers.NumpyScalarArrayMarshaller

Handles the following

python_attributes = {'Python.Type', 'Python.Shape', 'Python.Empty',
                     'Python.numpy.UnderlyingType',
                     'Python.numpy.Container', 'Python.Fields'}

matlab_attributes = {'H5PATH', 'MATLAB_class', 'MATLAB_empty',
                     'MATLAB_int_decode'}

types = (bool, int, float, complex)

python_type_strings = ('bool', 'int', 'float', 'complex')

matlab_classes = ()

PythonStringMarshaller

class hdf5storage.Marshallers.PythonStringMarshaller[source]

Bases: hdf5storage.Marshallers.NumpyScalarArrayMarshaller

Handles the following

python_attributes = {'Python.Type', 'Python.Shape', 'Python.Empty',
                     'Python.numpy.UnderlyingType',
                     'Python.numpy.Container', 'Python.Fields'}

matlab_attributes = {'H5PATH', 'MATLAB_class', 'MATLAB_empty',
                     'MATLAB_int_decode'}

types = (str, bytes, bytearray)

python_type_strings = ('str', 'bytes', 'bytearray')

matlab_classes = ()

PythonNoneEllipsisNotImplementedMarshaller

class hdf5storage.Marshallers.PythonNoneEllipsisNotImplementedMarshaller[source]

Bases: hdf5storage.Marshallers.NumpyScalarArrayMarshaller

Handles the following

python_attributes = {'Python.Type', 'Python.Shape', 'Python.Empty',
                     'Python.numpy.UnderlyingType',
                     'Python.numpy.Container', 'Python.Fields'}

matlab_attributes = {'H5PATH', 'MATLAB_class', 'MATLAB_empty',
                     'MATLAB_int_decode'}

types = (builtins.NoneType, builtins.ellipsis,
         builtins.NotImplementedType)

python_type_strings = ('builtins.NoneType', 'builtins.ellipsis',
                       'builtins.NotImplementedType')

matlab_classes = ()

PythonDictMarshaller

class hdf5storage.Marshallers.PythonDictMarshaller[source]

Bases: hdf5storage.Marshallers.TypeMarshaller

Handles the following

python_attributes = {'Python.Type', 'Python.Fields'}

matlab_attributes = {'H5PATH', 'MATLAB_class', 'MATLAB_fields'}

types = (dict, collections.OrderedDict)

python_type_strings = ('dict', 'collections.OrderedDict')

matlab_classes = ()

PythonCounterMarshaller

class hdf5storage.Marshallers.PythonCounterMarshaller[source]

Bases: hdf5storage.Marshallers.PythonDictMarshaller

Handles the following

python_attributes = {'Python.Type', 'Python.Fields'}

matlab_attributes = {'H5PATH', 'MATLAB_class', 'MATLAB_fields'}

types = (collections.Counter, )

python_type_strings = ('collections.Counter', )

matlab_classes = ()

PythonSliceRangeMarshaller

class hdf5storage.Marshallers.PythonSliceRangeMarshaller[source]

Bases: hdf5storage.Marshallers.PythonDictMarshaller

Handles the following

python_attributes = {'Python.Type', 'Python.Fields'}

matlab_attributes = {'H5PATH', 'MATLAB_class', 'MATLAB_fields'}

types = (slice, range)

python_type_strings = ('slice', 'range')

matlab_classes = ()

PythonDatetimeObjsMarshaller

class hdf5storage.Marshallers.PythonDatetimeObjsMarshaller[source]

Bases: hdf5storage.Marshallers.PythonDictMarshaller

Handles the following

python_attributes = {'Python.Type', 'Python.Fields'}

matlab_attributes = {'H5PATH', 'MATLAB_class', 'MATLAB_fields'}

types = (datetime.timedelta, datetime.timezone,
         datetime.date, datetime.time, datetime.datetime)

python_type_strings = ('datetime.timedelta', 'datetime.timezone',
                       'datetime.date', 'datetime.time',
                       'datetime.datetime')

matlab_classes = ()

PythonFractionMarshaller

class hdf5storage.Marshallers.PythonFractionMarshaller[source]

Bases: hdf5storage.Marshallers.PythonDictMarshaller

Handles the following

required_parent_modules = ('fractions', )

required_modules = ('fractions', )

python_attributes = {'Python.Type', 'Python.Fields'}

matlab_attributes = {'H5PATH', 'MATLAB_class', 'MATLAB_fields'}

types = ('fractions.Fraction', )

python_type_strings = ('fractions.Fraction', )

matlab_classes = ()

PythonListMarshaller

class hdf5storage.Marshallers.PythonListMarshaller[source]

Bases: hdf5storage.Marshallers.NumpyScalarArrayMarshaller

Handles the following

python_attributes = {'Python.Type', 'Python.Shape', 'Python.Empty',
                     'Python.numpy.UnderlyingType',
                     'Python.numpy.Container', 'Python.Fields'}

matlab_attributes = {'H5PATH', 'MATLAB_class', 'MATLAB_empty',
                     'MATLAB_int_decode'}

types = (list, )

python_type_strings = ('list', )

matlab_classes = ()

PythonTupleSetDequeMarshaller

class hdf5storage.Marshallers.PythonTupleSetDequeMarshaller[source]

Bases: hdf5storage.Marshallers.PythonListMarshaller

Handles the following

python_attributes = {'Python.Type', 'Python.Shape', 'Python.Empty',
                     'Python.numpy.UnderlyingType',
                     'Python.numpy.Container', 'Python.Fields'}

matlab_attributes = {'H5PATH', 'MATLAB_class', 'MATLAB_empty',
                     'MATLAB_int_decode'}

types = (tuple, set, frozenset, collections.deque)

python_type_strings = ('tuple', 'set', 'frozenset', 'collections.deque')

matlab_classes = ()

PythonChainMapMarshaller

class hdf5storage.Marshallers.PythonChainMapMarshaller[source]

Bases: hdf5storage.Marshallers.PythonListMarshaller

Handles the following

python_attributes = {'Python.Type', 'Python.Shape', 'Python.Empty',
                     'Python.numpy.UnderlyingType',
                     'Python.numpy.Container', 'Python.Fields'}

matlab_attributes = {'H5PATH', 'MATLAB_class', 'MATLAB_empty',
                     'MATLAB_int_decode'}

types = (collections.ChainMap, )

python_type_strings = ('collections.ChainMap', )

matlab_classes = ()