PyYAML
YAML parser and emitter for Python
Decision gist · record as of 2026-08-14
Yes. PyYAML is a foundational, production-stable library with no dependencies, broad platform coverage, active maintenance, zero known vulnerabilities, and permissive licensing. Install it whenever your project needs YAML parsing or generation.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Medium install friction due to compiled C extensions, but pre-built wheels cover all major platforms and Python versions.
- Active maintenance with recent commits and no known vulnerabilities.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute PyYAML with minimal restrictions, making it suitable for both open-source and proprietary projects.
last release 2025-09-25 (323 days) · last repo commit 2026-06-17 · 2,933 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,194,612,572 downloads/mo, #15 on PyPI
Alternatives
Verify before relying
pip install pyyaml
from pyyaml import safe_load
data = safe_load('key: value')
print(data)- Performance characteristics for large YAML files or deeply nested structures
- Whether the C extension is automatically used or requires explicit configuration
- Specific extension API capabilities and use patterns
What it is and what it does
PyYAML is a YAML 1.1 parser and emitter for Python that converts between YAML text and Python objects. It handles configuration files, object serialization, and data persistence with support for Unicode, standard YAML tags, and Python-specific tags for arbitrary object representation.
The package has no runtime dependencies and installs via pre-built wheels on all major platforms and Python versions from 3.8 onward. It is actively maintained, widely used (ranked 15th on PyPI), and carries no known security vulnerabilities, making it a stable choice for any project requiring YAML support.
Use it for
- Parse configuration files in YAML format for application startup and settings management
- Serialize Python objects to YAML for human-readable data export and persistence
- Convert between YAML and Python data structures in data processing pipelines
- Store and load complex nested data structures with type preservation
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
PyYAML is a foundational, production-stable library with no dependencies, broad platform coverage, active maintenance, zero known vulnerabilities, and permissive licensing. Install it whenever your project needs YAML parsing or generation.
Install
pyyaml on PyPI
Before you install
Medium install friction due to compiled C extensions, but pre-built wheels cover all major platforms and Python versions. Active maintenance with recent commits and no known vulnerabilities.
License in practice
MIT license is permissive; you can use, modify, and distribute PyYAML with minimal restrictions, making it suitable for both open-source and proprietary projects.
Quickstart
pip install pyyaml
from pyyaml import safe_load
data = safe_load('key: value')
print(data)
Verify before relying
- Performance characteristics for large YAML files or deeply nested structures
- Whether the C extension is automatically used or requires explicit configuration
- Specific extension API capabilities and use patterns
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 323 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,194,612,572 / month, #15 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: CythonProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTopic :: Text Processing :: Markup |
Evidence: pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl; pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl; pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl; pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl; pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl; pyyaml-6.0.3-cp310-cp310-win32.whl; pyyaml-6.0.3-cp310-cp310-win_amd64.whl; pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl; pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl; pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl; pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl; pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl; pyyaml-6.0.3-cp311-cp311-win32.whl; pyyaml-6.0.3-cp311-cp311-win_amd64.whl; pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl; pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “yaml serialization deserialization”
- PyYAMLPyYAML parses and emits YAML 1.1 data format, enabling serialization…
- PyYAML-ftPyYAML-ft is a YAML parser and emitter for Python 3.13 with support…
- yamlableConverts Python objects to YAML and back using PyYaml as its…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
Determines platform-specific directories for application data, config, cache, logs, and user media folders across macOS, Windows, Linux, and Android.
See also pyaml · PyYAML-ft · yamlcore · yamlable · HyperPyYAML · pycomposefile · dynamic-yaml · yaml-rs · yamlordereddictloader · pyyaml-include