Skip to main content

yamlprims

YAML 1.2.2 Core Schema value loader, strict yamlprims-value/1 wire decoder, and canonical encoder for Python (CPython 3.10+ via abi3 extension over the Rust yamlprims crate).

Features

  • Lossless YAML 1.2.2 Core Schema Document / Node / Mapping tree (load, load_all, load_bytes, load_all_bytes) with arbitrary-precision Python int for 128-bit integers (i128::MIN..=u128::MAX), exact IEEE 754 binary64 float bits (-0.0, NaN, ±Infinity), Tag / Tagged preservation, and Span / Location coordinates (byte_offset, line, column).
  • Single-pass native safe_load / safe_load_all and safe_dump / safe_dump_all (v0.3.0+) (spec-v1.6 §11.2): ergonomic replacements for yaml.safe_load and yaml.safe_dump over str, bytes, and file-like .read() / .write() streams, materializing Python dict, list, str, int, float, bool, and None directly in PyO3 under bounded resource limits.
  • Ordered Mapping without Python dict key collisions: YAML true, 1, and 1.0 remain distinct keys via yamlprims.key_eq rather than colliding as in Python's built-in dict.
  • Explicit to_plain() and encode_plain() loss matrix (spec-v1.6 §11.3): to_plain projects string-keyed mappings to dict and rejects non-string mapping keys or Tagged nodes with YamlprimsError(kind="type").
  • YAML 1.1 → YAML 1.2.2 Core migration lint (v0.3.0+) (lint_yaml11, encode_lint, LintResult, LintDiagnostic, LINT_CODES) reporting unquoted YAML 1.1 hazards (yaml11_boolean, yaml11_number, yaml11_sexagesimal, yaml11_merge_key) with source spans (spec-v1.6 §10.3, §11.7).
  • Strict yamlprims-value/1 wire decoder & canonical encoder (decode_wire, encode, encode_error) with byte-for-byte round-trip parity (spec-v1.6 §11.4).
  • Deterministic YAML 1.2.2 Core emitter & strict RFC 7493 I-JSON projection (dump, dump_all, safe_dump, safe_dump_all, from_plain, load_ijson, EmitLimits, EmitOptions) with yaml11_safe default compatibility quoting (spec-v1.6 §10.2, §11.6).

Example

import yamlprims

value = yamlprims.safe_load("name: demo\nenabled: on\nports: [80, 443]\n")  # v0.3.0+
# {'name': 'demo', 'enabled': 'on', 'ports': [80, 443]}
print(yamlprims.safe_dump(value), end="")  # v0.3.0+ yaml11_safe quoting: enabled: 'on'
yamlprims.load_ijson("b: 2\na: [1.0, 1e21]\n")  # '{"b":2,"a":[1,1e+21]}'

load_plain and load_ijson return JSON text. load_ijson output is RFC 7493 I-JSON, ready for RFC 8785 JCS canonicalization (for example with canonprims).

License

Dual-licensed under MIT OR Apache-2.0. See LICENSE-MIT, LICENSE-APACHE, and NOTICE.

Metadata

Release files for yamlprims 0.3.0

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

Built distributions (wheels)

Table of built distributions (wheels) for yamlprims 0.3.0
File Actions
yamlprims-0.3.0-cp310-abi3-win_arm64.whl CPython 3.10 abi3 Windows ARM64 Details for yamlprims-0.3.0-cp310-abi3-win_arm64.whl
yamlprims-0.3.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for yamlprims-0.3.0-cp310-abi3-win_amd64.whl
yamlprims-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for yamlprims-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
yamlprims-0.3.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for yamlprims-0.3.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
yamlprims-0.3.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for yamlprims-0.3.0-cp310-abi3-macosx_11_0_arm64.whl

Total release size: 2.8 MB

Release files / yamlprims-0.3.0-cp310-abi3-win_arm64.whl

Download URL yamlprims-0.3.0-cp310-abi3-win_arm64.whl
Size 466.6 kB
Tags CPython 3.10 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
717c9d5c9208e3d35e9e447694ea0d0454c3964f6fd9b4829d353517479e451d
BLAKE2b-256 checksum
How to use checksums
d125455e567038308e6252aad7c693b64e2fadbbc66a0934a476d758ea6b2282
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 18, 2026.

Transparency log

Release files / yamlprims-0.3.0-cp310-abi3-win_amd64.whl

Download URL yamlprims-0.3.0-cp310-abi3-win_amd64.whl
Size 479.8 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
595b22a0856f19bf209c88e17614f9c1cb3a4d3c5ee78cbf05186ef6d484fe5d
BLAKE2b-256 checksum
How to use checksums
ab42498ba21435114b7e63f210043ff20c5eebfc25b6924e8a63e950908b35ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 18, 2026.

Transparency log

Release files / yamlprims-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL yamlprims-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 628.8 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
993e744df989f31cd80724b0bc36b565060e8643d511b44476f120126d2769fc
BLAKE2b-256 checksum
How to use checksums
73b37714216ab9c66e351cfc580846e73d98aed226a27d9a51d1017d4a4c1d51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 18, 2026.

Transparency log

Release files / yamlprims-0.3.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL yamlprims-0.3.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 621.6 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
2eab575f650dfb0ff71b4452e33fd050ead05c09a5fc9f1db6ccdb32741a5e5b
BLAKE2b-256 checksum
How to use checksums
de0d05564a8d94760e5ab012ac9ea410ce5edb5db6e6dfa981fee3d79ec05f78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 18, 2026.

Transparency log

Release files / yamlprims-0.3.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL yamlprims-0.3.0-cp310-abi3-macosx_11_0_arm64.whl
Size 579.5 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7f21322014764792490a398525dad1e28d5b50a520871de56ccea2767f5912b4
BLAKE2b-256 checksum
How to use checksums
c2f2f6cbc14f0402a5be47c857bb71bfdf561ad78f51fb5d749fcdeca640c32f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 18, 2026.

Transparency log

Security for yamlprims 0.3.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

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for yamlprims-0.3.0-cp310-abi3-win_arm64.whl

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 18, 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.

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