--- id: oyaml version: "1.0" license: MIT license_treatment: permissive maintenance: dormant --- # oyaml — Ordered YAML: drop-in replacement for PyYAML which preserves dict ordering License: permissive · Maintenance: dormant · Downloads: 2.7M/mo ## What it is and what it does oyaml wraps PyYAML to preserve the order of keys in dictionaries during YAML serialization and deserialization. In scenarios where standard PyYAML could scramble dictionary key order, oyaml maintains insertion order throughout the round-trip. You import it as a drop-in replacement (import oyaml as yaml) and use it identically to PyYAML. The package depends only on pyyaml and installs as a pure-Python wheel, making setup trivial. It is dormant—last released in 2020-08-18 with no recent commits—so it receives no active development or bug fixes. This matters most if you rely on it with newer PyYAML versions or encounter edge cases that require upstream fixes. Use it for: - Preserving YAML key order in configuration files where the sequence of settings matters for readability - Round-tripping YAML data structures without losing the original key ordering - Ensuring consistent, predictable YAML dumps for version control or diff-friendly configuration management - Legacy codebases that need ordered YAML output before dict ordering became standard ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. oyaml is a drop-in replacement for PyYAML that preserves dictionary ordering when dumping and loading YAML, eliminating scrambled key order. Yes-with-conditions. Install if you need ordered YAML output and cannot rely on standard PyYAML. Be aware the package is unmaintained since 2020-08-18 and may not work reliably with recent PyYAML releases. If you can use modern Python versions where dict ordering is guaranteed, standard PyYAML may suffice. ## Install pip install oyaml uv add oyaml poetry add oyaml ## Installing oyaml Before you install: Installation is straightforward with low friction—a pure-Python wheel with a single runtime dependency on pyyaml. However, the package is dormant: the latest release was 2020-08-18, and no commits have landed since 2024-11-05, so it receives no active maintenance. License in practice: MIT is a permissive license with minimal restrictions, allowing commercial and private use without obligation to share modifications. Quickstart: pip install oyaml import oyaml as yaml data = yaml.safe_load(open('config.yaml')) yaml.safe_dump(data) Verify before relying: - Whether dict ordering preservation is still necessary given Python 3.7+ guarantees insertion order for built-in dicts - Compatibility with recent PyYAML versions and modern Python releases beyond what the fact sheet specifies ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 2.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags yaml dict ordering, ordered yaml parsing, pyyaml replacement, preserve yaml key order, yaml mapping order, ordered yaml dump, yaml dict preservation, yaml, serialization [View on SkillFed](https://skillfed.io/packages/oyaml) · [View on PyPI](https://pypi.org/project/oyaml/)