skillfed

yaml-rs

A High-Performance YAML Parser for Python written in Rust

yaml-rs v0.1.6 86.6K downloads/30d#13,852 on PyPI36
Permissive license Unlicense Active released

What it is and what it does

yaml-rs is a YAML parser that reads YAML 1.2 formatted text and converts it into Python dictionaries and other native types. It is written in Rust and exposed as a Python extension, trading some install complexity for significantly faster parsing than pure-Python alternatives. The package targets developers who need to parse YAML configuration files, data files, or other YAML content where parsing speed matters or where strict YAML 1.2 compliance is required.

The parser has no runtime dependencies beyond Python itself, making it lightweight once installed. It supports current Python versions (3.10 through 3.15) and is actively maintained. The main trade-off is that installation requires either a prebuilt wheel for your platform or a Rust compiler to build from source; however, wheels cover most common architectures.

Use it for:

  • Parse large YAML configuration files where speed is a bottleneck in application startup or reload cycles.
  • Process YAML data files in data pipelines where strict YAML 1.2 spec compliance is required.
  • Replace PyYAML in projects where YAML 1.1 compatibility issues cause incorrect parsing of certain inputs.
  • Load structured YAML documents in CLI tools or services where parsing latency affects user experience.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A high-performance YAML v1.2 parser for Python, implemented in Rust, that parses YAML strings into Python data structures.

Yes, if you need YAML parsing and either require YAML 1.2 spec compliance or want faster parsing than pure-Python libraries. The permissive license, active maintenance, zero runtime dependencies, and broad wheel coverage make it a low-friction upgrade from PyYAML. Install with caution only if your platform lacks a prebuilt wheel and you cannot compile Rust code.

Install

yaml-rs on PyPI

pip

pip install yaml-rs

uv

uv add yaml-rs

poetry

poetry add yaml-rs

Installing yaml-rs

Before you install

Medium install friction due to compiled Rust bindings, but prebuilt wheels are available for common architectures (x86_64, ARM, RISC-V across Linux, macOS, Windows). Active maintenance with recent releases; last commit 2026-08-14.

License in practice

Licensed under Unlicense (permissive public domain equivalent), imposing no restrictions on use, modification, or distribution.

Quickstart

pip install yaml-rs

import yaml_rs

yaml_string = "app:\n  name: service\n  debug: false"
data = yaml_rs.loads(yaml_string)
print(data)

Requires Python 3.10 or later; PyPy support is listed but wheel availability may vary by version.

Verify before relying

  • Whether the parser handles all edge cases of YAML v1.2 spec in practice, beyond passing the yaml-test-suite.
  • Performance benchmarks against other YAML 1.2 parsers in real-world workloads.
  • Stability and API compatibility guarantees given the 0.1.6 version number.

Package facts

License Unlicense (permissive)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 38 days since the last release
Last repo commit
First released
Downloads 86,564/month — #13,852 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: yaml_rs-0.1.6-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl; yaml_rs-0.1.6-cp310-cp310-macosx_10_12_x86_64.whl; yaml_rs-0.1.6-cp310-cp310-macosx_11_0_arm64.whl; yaml_rs-0.1.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; yaml_rs-0.1.6-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; yaml_rs-0.1.6-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; yaml_rs-0.1.6-cp310-cp310-manylinux_2_17_ppc64.manylinux2014_ppc64.whl; yaml_rs-0.1.6-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl; yaml_rs-0.1.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; yaml_rs-0.1.6-cp310-cp310-manylinux_2_31_riscv64.whl; yaml_rs-0.1.6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl; yaml_rs-0.1.6-cp310-cp310-musllinux_1_2_aarch64.whl; yaml_rs-0.1.6-cp310-cp310-musllinux_1_2_armv7l.whl; yaml_rs-0.1.6-cp310-cp310-musllinux_1_2_i686.whl; yaml_rs-0.1.6-cp310-cp310-musllinux_1_2_ppc64le.whl; yaml_rs-0.1.6-cp310-cp310-musllinux_1_2_riscv64.whl; yaml_rs-0.1.6-cp310-cp310-musllinux_1_2_x86_64.whl; yaml_rs-0.1.6-cp310-cp310-win32.whl; yaml_rs-0.1.6-cp310-cp310-win_amd64.whl; yaml_rs-0.1.6-cp310-cp310-win_arm64.whl

Keywords: yaml, parser

Development Status :: 5 - Production/StableProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: RustTopic :: Software Development :: LibrariesTyping :: Typed

Tags

yaml parser pythonfast yaml parsingyaml v1.2 parserrust yaml libraryyaml to dict pythonhigh performance yamlyaml loads
yaml-parsingrust-bindingperformance-oriented

More Libraries packages