ssg.yaml module

exception ssg.yaml.DocumentationNotComplete[source]

Bases: Exception

ssg.yaml.convert_string_to_bool(string)[source]

Returns True if string is “true” (in any letter case) returns False if “false” raises ValueError

ssg.yaml.open_and_expand(yaml_file, substitutions_dict=None)[source]

Process the file as a template, using substitutions_dict to perform expansion. Then, process the expansion result as a YAML content.

See also: _open_yaml

ssg.yaml.open_and_macro_expand(yaml_file, substitutions_dict=None)[source]

Do the same as open_and_expand, but load definitions of macros so they can be expanded in the template.

ssg.yaml.open_raw(yaml_file)[source]

Open given file-like object and parse it as YAML without performing any kind of template processing

See also: _open_yaml

ssg.yaml.ordered_dump(data, stream=None, Dumper=<class 'yaml.cyaml.CDumper'>, **kwds)[source]

Drop-in replacement for yaml.dump(), but preserves order of dictionaries

ssg.yaml.ordered_load(stream, Loader=<class 'yaml.cyaml.CLoader'>, object_pairs_hook=<class 'collections.OrderedDict'>)[source]

Drop-in replacement for yaml.load(), but preserves order of dictionaries

ssg.yaml.update_yaml_list_or_string(current_contents, new_contents, prepend=False)[source]