weldx.asdf.util.dataclass_serialization_class#

weldx.asdf.util.dataclass_serialization_class(class_type, class_name, version, to_yaml_tree_mod=None, from_yaml_tree_mod=None, sort_string_lists=True)#

Generate a asdf serialization class for a python dataclass.

Parameters:
  • class_type (type) – The type of the dataclass

  • class_name (str) – The value that should be stored as the classes name property

  • version (str) – The version number

  • to_yaml_tree_mod (Optional[Callable]) – A method that applies additional modifications to the tree during the to_yaml_tree function call

  • from_yaml_tree_mod (Optional[Callable]) – A method that applies additional modifications to the tree during the from_yaml_tree function call

  • sort_string_lists (bool) – Sort string lists before serialization.

Returns:

A new asdf serialization class.

Return type:

Type