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.1

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.1
File Actions
yamlprims-0.3.1-cp310-abi3-win_arm64.whl CPython 3.10 abi3 Windows ARM64 Details for yamlprims-0.3.1-cp310-abi3-win_arm64.whl
yamlprims-0.3.1-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for yamlprims-0.3.1-cp310-abi3-win_amd64.whl
yamlprims-0.3.1-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.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
yamlprims-0.3.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for yamlprims-0.3.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
yamlprims-0.3.1-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for yamlprims-0.3.1-cp310-abi3-macosx_11_0_arm64.whl

Total release size: 2.8 MB

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

Download URL yamlprims-0.3.1-cp310-abi3-win_arm64.whl
Size 466.7 kB
Tags CPython 3.10 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
2e87d77019f28dc89793e7381f61fa612281877ce90a01c64355cba2172a5b55
BLAKE2b-256 checksum
How to use checksums
7eb2516ded1df2b53b4e1570fb1b35919137be25781b8ef371960dafead2effd
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 23, 2026.

Transparency log

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

Download URL yamlprims-0.3.1-cp310-abi3-win_amd64.whl
Size 480.1 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
6db038b118f586300097d5872c10766ba313c3314a33683e5674ecf1a560757a
BLAKE2b-256 checksum
How to use checksums
bbe13bf8a2df3fb4d5a005640b564c237853fedfc0ffe48f4493a021ad641fbf
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 23, 2026.

Transparency log

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

Download URL yamlprims-0.3.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 629.2 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
ce82956b2e707db2f1bde22b99dde438707f9a961d313fa7021b47c8cbda0e79
BLAKE2b-256 checksum
How to use checksums
07102c059544744cb18f994f976ed22abf3b0dbed8a8630c1bbb26e521c7a15a
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 23, 2026.

Transparency log

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

Download URL yamlprims-0.3.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 621.5 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
6889796b475c124a37d31ff1f88d5be037332ff242cbe848113bff2dec047788
BLAKE2b-256 checksum
How to use checksums
4fdec2b1aedaf288efd151d14f037924dec29d80eca8444fb1274efac90f15b8
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 23, 2026.

Transparency log

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

Download URL yamlprims-0.3.1-cp310-abi3-macosx_11_0_arm64.whl
Size 579.0 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b5bf938efd394f45538a1f82cd815b1d6a656161f1c2874910aca5bf06f88f57
BLAKE2b-256 checksum
How to use checksums
b64cdbc6cf5e439a78045b2a6e7d4b7c8b135a05c8fa26f1b0e540c25fad5ae9
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 23, 2026.

Transparency log

Security for yamlprims 0.3.1

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.1-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 23, 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