Forge
/ local toolbox
Home
Search
Home
Converters
YAML → Python
YAML → Python
YAML to a working Python module.
YAML
name: Ada age: 36 tags: [a, b]
Python module
# Requires: pip install pyyaml (only for reading a YAML file) import json data = { "name": "Ada", "age": 36, "tags": [ "a", "b" ] } if __name__ == "__main__": print(json.dumps(data, indent=2))
Copy
Download