On this page
  1. parse-yaml
  2. Role
  3. Install
  4. Quickstart
  5. When to Reach for It
  6. Gotchas & Pitfalls
  7. Pairs With
  8. Metadata

parse-yaml

Prev: parse-xml1 | Up: projects | Next: parse-toml
Rel: wispsy, Foundation, parse-toml, parse-xml1
Ref: wispsy on GitHub
Tags: #public #wispsy #project #foundation #tier/standard


Role

Bounded YAML 1.2 core-schema subset parser for Python 3.14+ (0.1.0, zero runtime deps)—returning a typed Document (document.value, document.to_yaml(), source span) or value-only loads(), rejecting duplicate keys and unsupported constructs with ParseError line/column diagnostics.

Install

python -m pip install parse-yaml

Quickstart

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")

When to Reach for It

Gotchas & Pitfalls

Pairs With


Metadata

type: project-card
slug: parse-yaml
org: wispsy
repo: wispsy/parse-yaml
package: parse-yaml
import_name: parse_yaml
version: 0.1.0
requires_python: ">=3.14"
layer: foundation
topic: wispsy-foundation
status: active
language: python
source_docs: README.md, docs/

Linked from

Related notes