PyYAML is a YAML parser and emitter for Python.
PyYAML supports standard YAML tags and provides Python-specific tags that allow the representation of an arbitrary Python object. PyYAML is applicable for a broad range of tasks from complex configuration files to object serialization and persistence.
- a complete YAML 1.1 parser. In particular, PyYAML can parse all examples from the specification. The parsing algorithm is simple enough to be a reference for YAML parser implementors.
- Unicode support including UTF-8/UTF-16 input/output and u escape sequences.
- low-level event-based parser and emitter API (like SAX).
- high-level API for serializing and deserializing native Python objects (like DOM or pickle).
- support for all types from the YAML types repository. A simple extension API is provided.
- relatively sensible error messages.
In a hurry? Add it to your Download Basket!
What's New in version 3.09
- Fixed use of uninitialized memory when emitting anchors with LibYAML bindings (Thank to cegner(at)yahoo-inc(dot)com).
- Fixed emitting incorrect BOM characters for UTF-16 (Thank to Valentin Nechayev)
- Fixed the emitter for folded scalars not respecting the preferred line width (Thank to Ingy).
- Fixed a subtle ordering issue with emitting %TAG directives (Thank to Andrey Somov).