Skip to main content

pykvd

Python bindings for the KVD key-value document format, built on kvd-rs via PyO3 and maturin.

Install (from a built wheel)

pip install pykvd

Usage

import pykvd

# Parse KVD into plain Python objects.
doc = pykvd.loads("app:\n  port: 8080\n")
assert doc == {"app": {"port": 8080}}

# Serialize Python objects to canonical KVD.
pykvd.dumps({"app": {"port": 8080}})

# Normalize/validate a KVD document to its canonical form.
pykvd.canonical("app:\n  port: 8080")

# Verify a document against a schema document.
pykvd.verify("port: 8080\n", "port: int\n")

# Check a schema document is well-formed.
pykvd.validate_schema("port: int\n")

# Structural editing with spec 8.5 paths.
pykvd.get("app:\n  port: 8080\n", "app.port")
pykvd.set("app:\n  port: 8080\n", "app.port", 9090)
pykvd.remove("app:\n  port: 8080\n", "app.port")
pykvd.remove("a:\n  b:\n    c: 1\n", "a.b.c", recursive=True)

Type notes:

  • dumps accepts dicts, lists, tuples (as lists), str, int, float, bool, and None. Integers must fit in u64; larger values raise KvdError.
  • Int literals beyond u64 parse but come back from loads as strings.
  • The document root must be a mapping (spec 4).

Errors:

  • KvdError (a ValueError) for parse and serialization failures.
  • SchemaError (a KvdError) for verification failures and malformed schemas.
  • OpError (a KvdError) for bad operation paths. Missing keys raise KeyError and out-of-range indices raise IndexError.

Development

pip install maturin pytest
PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 maturin develop
pytest tests/

License

MIT

Metadata

Release files for pykvd 1.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 pykvd 1.1.0
File Size Uploaded Provenance
pykvd-1.1.0.tar.gz 9.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pykvd 1.1.0
File Interpreter ABI Platform
pykvd-1.1.0-cp311-abi3-manylinux_2_34_x86_64.whl CPython 3.11 abi3 Linux glibc 2.34+ x86-64 Details

Total release size: 1.1 MB

Release files / pykvd-1.1.0.tar.gz

Download URL pykvd-1.1.0.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3629a64d8e3d5afcd4bdc50952b7e9ee198214d21941c9f0519cc3bcf88fd6f7
BLAKE2b-256 checksum
How to use checksums
7ab2df3680ae8a77f5e9dacc1c45db873709ecba3150b5c89c085a8b26a0b09d
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 Sep 16, 2026.

Transparency log

Release files / pykvd-1.1.0-cp311-abi3-manylinux_2_34_x86_64.whl

Download URL pykvd-1.1.0-cp311-abi3-manylinux_2_34_x86_64.whl
Size 1.0 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
e2114d002f25cb277abc1ff868198c4ead462640394f03c7d4f0fc05e1b0430c
BLAKE2b-256 checksum
How to use checksums
2a3abcc004f89758b99b93fa815c0e731090447e7b00b85efb10ffdc14b3c7f5
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 Sep 16, 2026.

Transparency log

Security for pykvd 1.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

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

Select from 2 files

Attestation for pykvd-1.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 Sep 16, 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

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