cppbind.common.yaml_process

Helper module for processing yaml files

Functions

construct_concat(loader, node)

Custom constructor to create a node by concatenating string values of input nodes

construct_include(loader, node)

Include file referenced at node.

construct_join(loader, node)

join nodes.

has_type(obj, type_cls)

A function to determine whether an object is an instance of given type, or is an instance of YamlNode which has value of given type.

join_nodes(rdata, edata)

Join nodes defined after the !join constructor

load_yaml(file_path)

Load yaml file in specific dirs using MyLoader custom loader

to_value(obj)

A function to return real value of object

yaml_info_struct_to_dict(struct)

A function to rebuild dict from nested YamlNode object.

Classes

MyLoader(stream)

YAML MyLoader with !include constructor.

UniqueKeyLoader(stream)

Custom yaml loader to raise an error when duplicate key is found in yaml file.

YamlNode(value[, line_num, file])

Class which implements MutableMapping interface to act like a dict while keeping additional information.

Exceptions

YamlKeyDuplicationError

Exception subclass to raise duplication errors when a key is redefined in yaml file.