yaml_helper module

yaml_helper.construct_bool(loader, node)[source]
yaml_helper.construct_joined_sequence(loader: Loader, sequence: SequenceNode | Iterable)[source]
yaml_helper.construct_numeral(loader, node, type_constructor: ~typing.Callable = <class 'int'>)[source]

Construct a numeral scalar and cast to the desired type

yaml_helper.decode_node(loader, node)[source]
yaml_helper.include_constructor(loader, node)[source]
yaml_helper.load_yaml_from_file(file_name: str)[source]

Read and evaluate the YAML contained in the file with the given name, construct the corresponding python object and return it.

Parameters:
file_name: str

The path to the file to load.

Returns:
Any:

The object parsed from the YAML definitions in the given file.

yaml_helper.proto_constructor(class_constructor, set_defaults=None)[source]
yaml_helper.register_constructors()[source]

Register YAML constructors for all the custom tags