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 dataclassclass_name (
str
) – The value that should ba stored as the classes name propertyversion (
str
) – The version numberto_tree_mod (
Optional
[Callable
]) – A method that applies additional modifications to the tree during theto_tree
function callfrom_tree_mod (
Optional
[Callable
]) – A method that applies additional modifications to the tree during thefrom_tree
function callvalidators (
Optional
[dict
]) – Dict of validator keys and instances.
- Returns
A new asdf serialization class.
- Return type
Type