How to use the pyaml.PrettyYAMLDumper function in pyaml

To help you get started, we’ve selected a few pyaml examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github con2 / emrichen / emrichen / output.py View on Github external
def render_yaml(data):
    if isinstance(data, list):
        data = flatten_documents_lists(data)
    return yaml.dump_all(data,
        Dumper=pyaml.PrettyYAMLDumper,
        allow_unicode=True,
        default_flow_style=False,
    )