# ruamel.yaml

> A YAML 1.2 loader and dumper for Python that round-trips comments and formatting

Source: https://talira.ai/catalog/ruamel-yaml-c10hd8s5
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / serialization](https://talira.ai/categories/libraries/serialization)
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Ruamel bvba](https://talira.ai/orgs/ruamel.md)

ruamel.yaml is a YAML 1.2 loader and dumper for Python. Its default round-trip mode preserves comments, flow and block styles and key order when a file is loaded, changed and written back, which makes it suited to editing configuration files by program. It also has safe and unsafe modes for plain loading, a recursion limit for untrusted input, and optional C extensions. Since 0.18 it has deprecated the old [PyYAML](https://talira.ai/catalog/pyyaml-9s73nm9n.md)-style functions (`load`, `dump` and their variants) in favour of its `YAML()` API.

## Links

- Website: https://yaml.dev/doc/ruamel.yaml/
- Repository: https://sourceforge.net/projects/ruamel-yaml/
- Docs: https://yaml.dev/doc/ruamel.yaml/

## Problems it solves

- edit a YAML config file from Python without losing comments
- load YAML 1.2 in Python
- update keys in a YAML file while keeping its formatting

## Features

- YAML 1.2
- round-trip preservation of comments, styles and key order
- safe loading with a recursion limit
- optional C extensions

## Trust

Overall: 0.27 out of 1.
Signals: backing 0.30, extensibility 0.00.

- backed by Ruamel bvba

Warnings:

- activity not tracked: Talira doesn't read repositories on sourceforge.net yet

## Sources

[^1]: https://github.com/pycontribs/ruamel-yaml/blob/master/LICENSE (checked 29 Nov 2026)
