Examples — Python YAML package documentation
yaml.readthedocs.io › en › latestThe fact is that one should normally be doing round_trip_dump(dict(a=1, b=2)), sys.stdout) and do away with 90% of the cases for returning the string, and that all post-processing YAML, before writing to stream, can be handled by using the transform= parameter of dump, being able to handle most of the rest. But it is also much easier in the new ...