bsb_yaml package

Module contents

YAML parser for the BSB framework.

Submodules

bsb_yaml.components module

class bsb_yaml.components.YamlDependencyNode(*args, _parent=None, _key=None, **kwargs)

Bases: FileDependencyNode

Configuration dependency node to load yaml files.

get_node_name()
load_object()

bsb_yaml.parser module

class bsb_yaml.parser.YAMLConfigurationParser

Bases: ParsesReferences, ConfigurationParser

Parser plugin class to parse YAML configuration files.

data_description = 'YAML'
data_extensions = ('yaml', 'yml')
generate(tree, pretty=False)

Generate a string representation of the configuration tree (dictionary).

Parameters:
  • tree (dict) – configuration tree

  • pretty (bool) – if True, will add indentation to the output string

Returns:

str representation of the configuration tree

Return type:

str

parse(content, path=None)

Traverse the parsed tree and resolve any $ref and $import