dataclass_helpers

Contains helper methods for dataclasses.

Functions

Summary

asdict

Create a dictionary containing all fields of the dataclass.

exclude_from_dict_field

Create a dataclass field with which will be excluded from asdict.

file_loadable_field

Create a dataclass field which can be and object of type targetClass or file path.

file_loader_factory

Create file_loader functions to load targetClass from file.

fromdict

Create a dataclass instance from a dict and loads all file represented fields.

init_file_loadable_fields

Load objects into class when dataclass is initialized with paths.