weldx.asdf.util.dataclass_serialization_class

weldx.asdf.util.dataclass_serialization_class(class_type, class_name, version, to_tree_mod=None, from_tree_mod=None, validators=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 ba stored as the classes name property

  • version (str) – The version number

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

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

  • validators (Optional[dict]) – Dict of validator keys and instances.

Returns

A new asdf serialization class.

Return type

Type