Ruamel yaml has been serving us quite well, but the unclear upstream development is problematic. So I am looking at what we want in ruamel.yaml and what is the state of other libraries.
Requirements and nice-to-haves:
- MUST: yaml1.2 support
- MUST: equivalent or better performance
- MUST: PyPI packaging and up-to-date wheels
- MUST: round-trip yaml document update support
- could: metadata to traceback sources (see ruamel-yaml-line-info)
Current state of projects
pyyaml
This is supposed to be the canonical supported project by yaml project itself, but it has not had yaml1.2 support for years now, and there are multiple issues raised on various python version compatibilities
Looks like a new project (first release Jan 2026) of the yaml project. The wheels are python version independent so that is more promissing. But it being rough around the edges is an understatement
ruamel.yaml
The pure python package works fine, it's just the compiled ones that are problematic. To get the round-trip support or metadata we also need to use the pure python implementation.
Because of course there is a rust based one. It still has python-dependent wheels, but at least they have the python3.15 wheels. It claims to have both round-trip and line source. But of course its first release was June 2026 and looks heavily AI-ed
Ruamel yaml has been serving us quite well, but the unclear upstream development is problematic. So I am looking at what we want in
ruamel.yamland what is the state of other libraries.Requirements and nice-to-haves:
Current state of projects
pyyaml
This is supposed to be the canonical supported project by yaml project itself, but it has not had yaml1.2 support for years now, and there are multiple issues raised on various python version compatibilities
yamlstar
Looks like a new project (first release Jan 2026) of the yaml project. The wheels are python version independent so that is more promissing. But it being rough around the edges is an understatement
ruamel.yaml
The pure python package works fine, it's just the compiled ones that are problematic. To get the round-trip support or metadata we also need to use the pure python implementation.
YAMLRocks
Because of course there is a rust based one. It still has python-dependent wheels, but at least they have the python3.15 wheels. It claims to have both round-trip and line source. But of course its first release was June 2026 and looks heavily AI-ed