skillfed

strictyaml

Strict, typed YAML parser

strictyaml Permissive license MIT AGING 1,622 v1.7.3 released

Install

strictyaml on PyPI

pip

pip install strictyaml

uv

uv add strictyaml

poetry

poetry add strictyaml

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.7.0)
Install friction low — pure-Python wheel
Runtime dependencies 1 — python-dateutil
Maintenance aging — 1,252 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: strictyaml-1.7.3-py3-none-any.whl

Keywords: yaml

License :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Topic :: Software Development :: LibrariesTopic :: Text Processing :: Markup

About strictyaml

from the package's own PyPI description — quoted content, verbatim

StrictYAML

StrictYAML is a type-safe YAML parser that parses and validates a restricted subset of the YAML specification.

Priorities:

  • Beautiful API
  • Refusing to parse the ugly, hard to read and insecure features of YAML like the Norway problem.
  • Strict validation of markup and straightforward type casting.
  • Clear, readable exceptions with code snippets and line numbers.
  • Acting as a near-drop in replacement for pyyaml, ruamel.yaml or poyo.
  • Ability to read in YAML, make changes and write it out again with comments preserved.
  • Not speed, currently.

Simple example:

# All about the character
name: Ford Prefect
age: 42
possessions:
- Towel

from strictyaml import load, Map, Str, Int, Seq, YAMLError

Default parse result:

```python >>> load(yaml_snippet) YAML({'name': 'Ford Prefect', 'age': '42', 'possessions':...

Read as markdown · JSON record · Source repository · Docs

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

StrictYAML parses and validates a restricted, type-safe subset of YAML, rejecting unsafe features while preserving comments and line numbers for roundtrip editing.

Low friction: pure Python wheel with only python-dateutil as a runtime dependency. Maintenance is aging—last release was 2023-03-10 with no commits since 2025-05-23—but the repository remains active.

MIT license permits commercial and private use with minimal restrictions; attribution required but no copyleft obligations.

Usage

pip install strictyaml

from strictyaml import load, Map, Str, Int, Seq

schema = Map({"name": Str(), "age": Int(), "possessions": Seq(Str())})
person = load("name: Ford Prefect\nage: 42\npossessions:\n  - Towel", schema)
print(person.data)

Requires Python >=3.7.0

Verdict: StrictYAML is a stable, permissively licensed YAML parser suited for configuration files where safety and schema validation matter more than speed. Aging maintenance (last release 2023-03-10) is acceptable for a mature library, but users should verify it meets their Python version and feature needs before adoption.

Needs verification

  • Whether the 1252-day gap since last release reflects intentional stability or abandonment risk for future Python versions
  • Performance characteristics relative to alternatives for large configuration files
  • Compatibility with Python 3.12+ given the aging maintenance status
strict yaml parsertype-safe yaml validationsafe yaml parsingyaml schema validationyaml with comments preservedrestricted yaml subsetyaml configuration parser

Similar packages