$npx skillfedfor your agent

saneyaml

Read and write readable YAML safely preserving order and avoiding bad surprises with unwanted infered type conversions. This library is a PyYaml wrapper with sane behaviour to read and write readable YAML safely, typically when used for configuration.

With conditionsPyPI Software DevelopmentReleased Aug 2024170.4K downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — saneyaml-0.6.1-py3-none-any.whl
v0.6.1 · released 2024-08-14 · Python >=3.7 · 1 runtime deps: PyYAML

Yes, if you need predictable YAML handling for configuration files and want to avoid PyYAML's automatic type conversions. The single dependency, permissive license, and low install friction make it a lightweight addition. Maintenance is aging (last release 2024-08-14, no updates in over 730 days), but the repository is active and there are no known security vulnerabilities. Suitable for stable, non-evolving use cases; monitor the repo if you need ongoing feature development.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires PyYAML 5.x or higher and Python 3.7+.
  • Low install friction with a single runtime dependency (PyYAML).
  • Maintenance status is aging—last commit was 2025-03-30 and the latest release was 2024-08-14, over 730 days ago—but the repository remains active and unarchived.

License · maintenance · safety

Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), so you can use it freely in commercial and private projects without copyleft obligations.

last release 2024-08-14 (730 days) · last repo commit 2025-03-30 · 10 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 170,427 downloads/mo, #10,395 on PyPI

Verify before relying

pip install saneyaml

from saneyaml import load, dump

yaml_text = '''version: 3.0.0
description: Example config'''
data = load(yaml_text)
output = dump(data)
print(output)
  • Whether duplicate key detection is enabled by default or requires explicit configuration.
  • Performance characteristics when handling large YAML files compared to raw PyYAML.
  • Scope of 'sane behavior' differences from PyYAML beyond type conversion and ordering.
Same gist for agents: .md · .json

What it is and what it does

saneyaml is a thin wrapper around PyYAML designed to make YAML parsing and generation more predictable for typical configuration-file use cases. It addresses two common pain points: unwanted type inference (converting strings like '3.0.0' into floats or booleans) and loss of key order. By default, saneyaml loads everything except booleans as strings, preserves insertion order in dictionaries, and can optionally detect duplicate map keys—all while producing clean, readable YAML output when dumping.

The library is intended for developers who need reliable, unsurprising YAML handling in configuration workflows. It trades some of PyYAML's automatic type conversion for predictability, making it especially useful when you want version strings, IDs, and other numeric-looking values to remain strings unless explicitly converted.

Use it for

  • Parse configuration files where numeric-looking strings (versions, IDs) must stay strings and not convert to numbers.
  • Generate human-readable YAML output from Python dicts while maintaining consistent formatting and key order.
  • Detect and report duplicate keys in YAML maps to catch configuration errors early.
  • Load YAML safely in build or deployment tools where type surprises could cause silent failures.
  • Preserve the order of configuration keys when round-tripping YAML through Python.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need predictable YAML handling for configuration files and want to avoid PyYAML's automatic type conversions.

The single dependency, permissive license, and low install friction make it a lightweight addition. Maintenance is aging (last release 2024-08-14, no updates in over 730 days), but the repository is active and there are no known security vulnerabilities. Suitable for stable, non-evolving use cases; monitor the repo if you need ongoing feature development.

Install

saneyaml on PyPI

Before you install

Low install friction with a single runtime dependency (PyYAML). Maintenance status is aging—last commit was 2025-03-30 and the latest release was 2024-08-14, over 730 days ago—but the repository remains active and unarchived.

Requires PyYAML 5.x or higher and Python 3.7+.

License in practice

Licensed under Apache-2.0 (permissive), so you can use it freely in commercial and private projects without copyleft obligations.

Quickstart

pip install saneyaml

from saneyaml import load, dump

yaml_text = '''version: 3.0.0
description: Example config'''
data = load(yaml_text)
output = dump(data)
print(output)

Verify before relying

  • Whether duplicate key detection is enabled by default or requires explicit configuration.
  • Performance characteristics when handling large YAML files compared to raw PyYAML.
  • Scope of 'sane behavior' differences from PyYAML beyond type conversion and ordering.

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.7
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
PyYAML
MaintenanceAging 730 days since the last release
Last repo commit
First released
Downloads170,427 / month, #10,395 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: Software DevelopmentTopic :: Utilities

Evidence: saneyaml-0.6.1-py3-none-any.whl

Tags

Capabilities
yaml configuration readersafe yaml parsingpyyaml wrapperyaml type conversionordered yaml loadingreadable yaml outputyaml duplicate key detection
Topics
yaml-parsingconfiguration-management
PyPI keywords
utilitiesyamlpyyamlblockflow

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 › “pyyaml wrapper”

  • saneyamlA lightweight PyYAML wrapper that reads and writes YAML safely with…
  • pyamlProduces human-readable, diff-friendly YAML output from Python data…
  • 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 Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also oyaml · pyaml · yamlcore · yamlable · yamlloader · aspy.yaml · yamlordereddictloader · PyYAML · HyperPyYAML · annotatedyaml