# PyYAML

> YAML parser and emitter for Python

Source: https://talira.ai/catalog/pyyaml-9s73nm9n
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / serialization](https://talira.ai/categories/libraries/serialization), [languages / python](https://talira.ai/categories/languages/python)
- Licence: MIT[^2]
- Pricing: Free and open source[^2]
- Free tier: yes[^2]
- Backed by: [The YAML Project](https://talira.ai/orgs/yaml-project.md)

PyYAML is a Python library for reading and writing YAML. It loads YAML documents into Python objects and dumps Python objects back to YAML, in pure Python or, when LibYAML is installed, through its faster C parser and emitter (`CLoader`, `CDumper`). `yaml.safe_load` loads only plain types such as strings, numbers, lists and dictionaries, and is the call to use for input you don't trust: `yaml.load` with the full loader can construct arbitrary Python objects.

## Links

- Website: https://pyyaml.org/
- GitHub: https://github.com/yaml/pyyaml
- Docs: https://pyyaml.org/wiki/PyYAMLDocumentation

## Problems it solves

- read a YAML config file in Python
- write a Python dictionary out as YAML
- parse YAML from users without letting it run code

## Features

- read and write YAML files in Python
- safe loading of untrusted YAML with safe_load
- optional fast C parser and emitter through LibYAML
- custom tags mapped to Python classes

## Limitations

- yaml.load with the full or unsafe loader can run arbitrary Python code from a crafted document; only yaml.safe_load is safe for untrusted input.[^1]

## Trust

Overall: 0.50 out of 1.
Signals: maintenance 0.61, adoption 0.70, momentum 0.37, community 0.65, backing 0.30, extensibility 0.00.

- last commit 9 days ago
- 2 commits in the last 90 days
- latest release 6.0.4 9 days ago
- 3.0k GitHub stars
- 40 contributors
- backed by The YAML Project

## Alternatives

- [ruamel.yaml](https://talira.ai/catalog/ruamel-yaml-c10hd8s5.md): A YAML 1.2 loader and dumper for Python that round-trips comments and formatting

## Sources

[^1]: https://pyyaml.org/wiki/PyYAMLDocumentation (checked 26 Nov 2026)
[^2]: https://github.com/yaml/pyyaml/blob/main/LICENSE (checked 26 Nov 2026)
