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 dataclassclass_name (
str
) – The value that should be stored as the classes name propertyversion (
str
) – The version numberto_yaml_tree_mod (
Optional
[Callable
]) – A method that applies additional modifications to the tree during theto_yaml_tree
function callfrom_yaml_tree_mod (
Optional
[Callable
]) – A method that applies additional modifications to the tree during thefrom_yaml_tree
function callsort_string_lists (
bool
) – Sort string lists before serialization.
- Returns:
A new asdf serialization class.
- Return type:
Type