API reference
PythonizeYAML exposes one PyYAML-compatible API. load() and load_all() return style-aware Document objects that also behave like the ordinary dict and list values they wrap, and dump() and dump_all() accept those documents directly. Style editing is layered on the same objects.
The reference is organized as follows:
- Loading and dumping – the module-level functions and the
YAML/SafeYAMLengines, with full signatures and per-argument descriptions. - Documents and style editing – the
Documentclass and its members, theDocumentMapping/DocumentSequence/DocumentScalarsubclasses, the styling API on values,Comments, andDocumentStream. - Pydantic integration –
YAMLModelandYAMLSettingswith byte-for-byte YAML round trips through validation. - Configuration, styles, and tagged values –
IndentConfig,DEFAULT_CONFIG, the style enums,SourceSpan, andTagged. - Errors – the
YAMLErrorhierarchy and when each exception is raised.
If you are new to the package, start with the Tutorial and return here for exact signatures.