YAML (Yet Another Markup Language) is a language for reading and writing configuration information to files. It is easy to read and write by both humans and computers. YAML also happens to be a superset of JSON. It uses indentation instead of the braces used by JSON.
$ python3 -m pip install PyYAML
import yaml y = yaml.load(open("foobar.yaml"))
yaml.dump(y, open("foobar.yaml", "w"))
yaml.dump(y, open("foobar.yaml", "w"), default_flow_style=False)
Tried with: PyYAML 3.11, Python 3.5.2 and Ubuntu 16.04