Software
A YAML 1.2 parser/formatter for Python, implemented in Rust for speed
and correctness. Built on the excellent
saphyr
crate.
For almost every use case, yaml12 lets you work with plain builtin
Python types end to end: dict, list, int, float, str, and
None. JSON is a subset of YAML 1.2, so all valid JSON is also valid
YAML and parses the same way.
- Parse YAML text or files with
parse_yaml()andread_yaml(). - Serialize Python values with
format_yaml()orwrite_yaml(). - 100% compliance with the yaml-test-suite .
- Advanced YAML features (document streams, tags, complex mapping keys) are supported and
round-trip cleanly when needed.
Yamlis the wrapper type for tagged nodes and unhashable mapping keys.

