pyaml
PyYAML-based module to produce a bit more pretty and readable YAML-serialized data
Decision gist · record as of 2026-08-14
Yes, if you need human-readable YAML output and can accept that it prioritizes readability over round-trip fidelity. Low install friction, active maintenance, no known vulnerabilities, and permissive licensing make it a safe choice. Skip it if you require exact deserialization or prefer to use PyYAML directly with explicit parameters.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later.
- Low friction: single runtime dependency (PyYAML), pure Python wheel, actively maintained with a release 41 days ago.
License · maintenance · safety
WTFPL (permissive) — Licensed under WTFPL (permissive), which places no significant restrictions on use or redistribution.
last release 2026-07-04 (41 days) · last repo commit 2026-07-04 · 138 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 7,624,214 downloads/mo, #1,712 on PyPI
Alternatives
Verify before relying
pip install pyaml
import pyaml
data = {'key': 'value', 'nested': {'a': 1, 'b': 2}}
pyaml.p(data)- Whether output stability guarantees exist across versions (description notes tweaks may change representation).
- Whether the module handles all PyYAML-compatible types or has undocumented limitations.
What it is and what it does
pyaml wraps PyYAML to produce YAML output optimized for human reading and editing rather than round-trip fidelity. It applies sensible formatting defaults—unicode support, 100-character width, sorted dict keys, simplified boolean representation—and makes stylistic choices like rendering null values as empty, using literal block scalars for certificates, and adding vertical spacing between sections. The module is designed for serialization only; the description explicitly warns that output may not deserialize exactly as exported and is not guaranteed stable between versions, though representation tweaks can usually be disabled via parameters.
It's a small, single-dependency package intended for cases where human-readable YAML output matters more than perfect round-tripping. The author recommends copy-pasting its functionality into projects that only need part of it, rather than adding a dependency for its own sake.
Use it for
- Pretty-print configuration files or complex data structures to stdout or files for inspection and manual editing.
- Generate human-friendly YAML diffs by sorting keys and controlling formatting to reduce noise in version control.
- Debug-print non-trivial Python objects (dicts, dataclasses, enums) as readable YAML during development.
- Convert JSON or YAML files to more readable YAML format via the command-line interface.
- Format logging or diagnostic output as readable YAML for operational visibility.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need human-readable YAML output and can accept that it prioritizes readability over round-trip fidelity.
Low install friction, active maintenance, no known vulnerabilities, and permissive licensing make it a safe choice. Skip it if you require exact deserialization or prefer to use PyYAML directly with explicit parameters.
Install
pyaml on PyPI
Before you install
Low friction: single runtime dependency (PyYAML), pure Python wheel, actively maintained with a release 41 days ago.
Requires Python 3.8 or later.
License in practice
Licensed under WTFPL (permissive), which places no significant restrictions on use or redistribution.
Quickstart
pip install pyaml
import pyaml
data = {'key': 'value', 'nested': {'a': 1, 'b': 2}}
pyaml.p(data)
Verify before relying
- Whether output stability guarantees exist across versions (description notes tweaks may change representation).
- Whether the module handles all PyYAML-compatible types or has undocumented limitations.
Package facts
| License | WTFPL permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagePyYAML |
| Maintenance | Actively maintained 41 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,624,214 / month, #1,712 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: Public DomainProgramming Language :: PythonProgramming Language :: Python :: 3.8Topic :: Software DevelopmentTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities |
Evidence: pyaml-26.7.0-py3-none-any.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 pretty print”
- pyamlProduces human-readable, diff-friendly YAML output from Python data…
- devtoolsProvides a `debug()` function that prints variables with their names,…
- prettyprinterSyntax-highlighted, declarative pretty printer for Python that…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
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.
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.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
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.
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.
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.
See also PyYAML · yamlable · saneyaml · dmiparser · oyaml · ruamel.yaml.string · PyYAML-ft · HyperPyYAML · dynamic-yaml · ruamel.yaml