lab_driver.yaml_handler#

Module Contents#

Classes#

API#

class lab_driver.yaml_handler.YamlConfigHandler(yaml_template: Any | dict, path2yaml='config', yaml_name='Config_Train', folder_reference: str = 'lab_driver')[source]#

Initialization

Creating a class for handling YAML files Args: yaml_template: Dummy dataclass with entries or dictionary (is only generated if YAML not exist) path2yaml: String with path to the folder which has the YAML file [Default: ‘’] yaml_name: String with name of the YAML file [Default: ‘Config_Train’] folder_reference: String with folder reference to start

property path2chck: str#

Getting the path to the desired YAML file

static translate_dataclass_to_dict(class_content: type) dict[source]#

Translating all class variables with default values into dict

write_dict_to_yaml(config_data: dict, print_output: bool = False) None[source]#

Writing list with configuration sets to YAML file Args: config_data: Dict. with configuration print_output: Printing the data in YAML format Returns: None

get_class(class_constructor: type)[source]#

Getting all key inputs from yaml dictionary to a class

get_dict() dict[source]#

Writing list with configuration sets to YAML file Returns: Dict. with configuration