--- id: rapidyaml version: "0.15.2" license: MIT license_treatment: permissive maintenance: active --- # rapidyaml — Parse and emit YAML, and do it fast. Python wrapper for the C++ library License: permissive · Maintenance: active · Downloads: 261.3K/mo ## What it is and what it does Rapidyaml is a Python wrapper around a C++ YAML parser and emitter designed for speed. It exposes a low-level, index-based API that operates on node indices and string views rather than constructing Python dictionaries and lists automatically. All scalar values are returned as untyped strings via memoryview objects, and you must manually walk the tree and convert types as needed. The tradeoff is substantial performance: the package documentation shows parsing speeds 100x and up to 400x faster than alternatives and emitting speeds as high as 3000x faster, though those gains come from avoiding Python-side type conversions and data structure construction. The package is built on precompiled wheels for modern Python versions across common platforms. It requires you to manage the lifetime of input buffers when using in-place parsing, or to use the arena-based approach for safer operation. The single runtime dependency is deprecation. This is a tool for scenarios where YAML parsing speed is a bottleneck and you can tolerate a lower-level API and manual tree navigation. Use it for: - Parsing large YAML configuration files where speed is critical and you can manually construct Python objects from the tree. - Streaming or batch processing of YAML documents in performance-sensitive applications. - Emitting YAML at high throughput in data pipelines or real-time systems. - Building custom YAML-based serialization layers where you need fine-grained control over tree structure. - Embedded or resource-constrained environments where the C++ backend's efficiency matters. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses and emits YAML documents via a fast C++ backend, exposing an index-based low-level API that works with node indices and string views rather than building native Python data structures. Yes, if you need to parse or emit YAML at scale and can work with a low-level index-based API and manual type conversion. No, if you expect automatic Python object construction or need a high-level interface. The package is actively maintained, has no known vulnerabilities, and carries a permissive MIT license. ## Install pip install rapidyaml uv add rapidyaml poetry add rapidyaml ## Installing rapidyaml Before you install: Medium install friction due to compiled wheels; prebuilt binaries available for Python 3.10–3.12 across macOS, Linux, and Windows architectures. Active maintenance with a recent release 50 days ago. Single runtime dependency on deprecation. License in practice: MIT license permits commercial and private use with minimal restrictions; suitable for most projects. Quickstart: pip install rapidyaml import rapidyaml yaml_bytes = b"{key: value, seq: [0, 1, 2]}" tree = rapidyaml.parse_in_arena(yaml_bytes) root_id = tree.root_id() child_id = tree.find_child(root_id, b"key") print(tree.val(child_id)) Scalars are returned as memoryview objects to the source buffer; requires explicit encoding conversion to work with Python strings. Verify before relying: - Whether the low-level index-based API is suitable for typical YAML workflows or primarily targets performance-critical use cases. - Compatibility with YAML specification versions and dialect-specific parsing behavior. - Memory overhead of the arena-based approach compared to in-place parsing for large documents. - Actual performance gains in real-world applications versus the benchmark scenarios provided. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 261.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags fast yaml parser, yaml parsing performance, c++ yaml library python, high-speed yaml emitter, yaml tree traversal, low-level yaml api, performance-critical, c-extension, low-level-api [View on SkillFed](https://skillfed.io/packages/rapidyaml) · [View on PyPI](https://pypi.org/project/rapidyaml/)