Skip to main content

parse-yaml

Bounded YAML 1.2 core-schema subset parsing for Python 3.14+, with no runtime dependencies.

python -m pip install parse-yaml
from parse_yaml import parse

document = parse("""
name: Ada
active: true
roles:
  - admin
  - editor
""")

assert document.value == {
    "name": "Ada",
    "active": True,
    "roles": ["admin", "editor"],
}
assert document.to_yaml().startswith("\nname: Ada")

parse() returns a typed Document with the parsed Python value, original source, and a source span. loads() returns only the value. Mapping keys are strings, and duplicate keys, invalid input, and unsupported YAML constructs raise ParseError with a line and column.

The parser supports block mappings and sequences, flow mappings and sequences, single- and double-quoted scalars, comments, and YAML 1.2 core null, boolean, integer, and finite floating-point values. It intentionally does not implement all of YAML; see the supported syntax and API contract.

Development and distribution checks:

uv sync
uv run python -m pytest
uv run python scripts/check_distribution.py --output-dir /tmp/parse-yaml-candidate

Releasing

Releases are published from main by pushing a v-prefixed tag matching the version in pyproject.toml (for example, v0.1.0). The release workflow checks that the tagged commit is on main and that the tag matches the package version before publishing the verified distributions.

Before the first release, configure the GitHub Actions environment pypi and add a Trusted Publisher to the PyPI project parse-yaml with owner wispsy, repository parse-yaml, workflow filename release.yaml, and environment pypi. Publishing uses Trusted Publishing; no PyPI API token is required.

Metadata

Release files for parse-yaml 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for parse-yaml 0.1.0
File Size Uploaded Provenance Actions
parse_yaml-0.1.0.tar.gz 12.3 kB With provenance Details for parse_yaml-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for parse-yaml 0.1.0
File Interpreter ABI Platform Actions
parse_yaml-0.1.0-py3-none-any.whl Python 3 none any Details for parse_yaml-0.1.0-py3-none-any.whl

Total release size: 21.6 kB

Release files / parse_yaml-0.1.0.tar.gz

Download URL parse_yaml-0.1.0.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3c8b5dc7602b09dc4b6e55cf2324dca8cd9a1ae33a2e3f2fdae2976e138e8034
BLAKE2b-256 checksum
How to use checksums
39b9f633c85c671db0f164f10ce427bd80669afd69e0d2a9e8982a25c99a33f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / parse_yaml-0.1.0-py3-none-any.whl

Download URL parse_yaml-0.1.0-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ebb6e0158a1cb26c300d41c8149d59acf84b838c4e30af873e52270f4a957d6
BLAKE2b-256 checksum
How to use checksums
6b2f5c3d8e6089b81e2a3c62ae7bd7d2768cb636c518277931f94c3e199ee398
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for parse-yaml 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for parse_yaml-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page