Serialisation¶
Provides an ability to serialise Stone Soup objects into and from YAML.
Stone Soup utilises YAML for serialisation. The Declarative Base feature of components is exploited in order to store the data of the components and data types.
- class stonesoup.serialise.YAML(typ='rt')[source]¶
Class for YAML serialisation.
- classmethod yaml_tag(class_)[source]¶
Return YAML tag for object.
Constructed from module and class name.
- classmethod declarative_to_yaml(representer, node)[source]¶
Convert declarative class instances to YAML.
Store as mapping of declared properties, skipping any which are the default value.
- classmethod declarative_from_yaml(constructor, tag_suffix, node)[source]¶
Convert YAML to declarative class instances.
- static timedelta_to_yaml(representer, node)[source]¶
Convert datetime.timedelta to YAML.
Value is total number of seconds.
- static timedelta_from_yaml(constructor, node)[source]¶
Convert YAML to datetime.timedelta.
Value should be total number of seconds.
- static path_to_yaml(representer, node)[source]¶
Convert path to YAML.
Value is total number of seconds.