MCPcopy Create free account
hub / github.com/aws/aws-cli / yaml_dump

Function yaml_dump

awscli/customizations/cloudformation/yamlhelper.py:81–95  ·  view source on GitHub ↗

Dumps the dictionary as a YAML document :param dict_to_dump: :return:

(dict_to_dump)

Source from the content-addressed store, hash-verified

79
80
81def yaml_dump(dict_to_dump):
82 """
83 Dumps the dictionary as a YAML document
84 :param dict_to_dump:
85 :return:
86 """
87
88 yaml = ruamel.yaml.YAML(typ="safe", pure=True)
89 yaml.default_flow_style = False
90 yaml.Emitter = SafeLineBreakEmitter
91 yaml.Representer = FlattenAliasRepresenter
92 _add_yaml_1_1_boolean_resolvers(yaml.Resolver)
93 yaml.Representer.add_representer(OrderedDict, _dict_representer)
94
95 return dump_yaml_to_str(yaml, dict_to_dump)
96
97
98def _dict_constructor(loader, node):

Callers 7

test_yaml_with_tagsMethod · 0.90
test_known_templatesFunction · 0.90
do_exportMethod · 0.90
_exportMethod · 0.90

Calls 2

dump_yaml_to_strFunction · 0.90