kaiv — Python bindings
Python bindings for kaiv, an immutable structural type system for data at rest. The same Rust core the CLI and the playground wrap, surfaced pythonically: strings in, strings (or bytes) out, exceptions instead of error envelopes.
pip install kaiv
The pipeline
import kaiv
# Authored .kaiv -> canonical .daiv (compile + denormalize).
daiv = kaiv.build("host=api.example.com\n!int\nport=8080\n")
# Schema-aware build: defaults materialize, head types lift,
# authored units convert (exactly, or the build fails).
daiv = kaiv.build(
"!float:km\n/trip::dist=42\n",
schema=".!saiv acme/trip\n\n!float:m\n/trip::dist=\n",
)
assert "/trip::dist=42000" in daiv
# Validation: None on pass, kaiv.ValidationError on a verdict.
schema = ".!saiv demo/server\n.!types std/net\n\n&port\nport=\n"
kaiv.validate(kaiv.build("port=8080\n"), schema)
# Schema inference: a document to its authored .saiv.
saiv = kaiv.infer("host=x\nport=8080\n", "demo/server")
# The standard formatter.
canonical = kaiv.fmt("a = 1\n")
The format hub
# Foreign text formats -> authored .kaiv.
k = kaiv.import_from("json", '{"host": "x", "port": 8080}')
# Canonical .daiv -> foreign formats. Text formats return str,
# binary formats (cbor, avro, asn1) return bytes.
j = kaiv.export_to("json", kaiv.build(k))
b = kaiv.export_to("cbor", kaiv.build(k))
# Foreign schemas -> authored .saiv (sound weakening):
# jsonschema | xsd | proto | avsc | graphql.
s = kaiv.import_schema("jsonschema", open("api.schema.json").read(),
"acme/api")
Individual pipeline stages
raiv = kaiv.compile(text) # .kaiv -> .raiv (relational)
daiv = kaiv.denormalize(raiv) # .raiv -> .daiv (canonical)
csaiv = kaiv.compile_schema(s) # .saiv -> .csaiv (contract)
text = kaiv.unbuild(daiv) # .daiv/.raiv -> authored .kaiv
# (a view: resolved sugar --
# comments, variables, refs --
# does not come back)
Errors raise kaiv.KaivError; validation verdicts raise
kaiv.ValidationError (a subclass). kaiv.version() reports the
bindings/core version.
The format is specified at
kaiv.io/kaiv/spec/latest;
resolution here is offline (the std/* libraries are embedded —
registry-resolving builds belong to the CLI and kaiv db-class
tooling).
License
MIT or Apache-2.0, at your option.
Metadata
Release files for kaiv 0.14.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kaiv-0.14.0.tar.gz | 17.1 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| kaiv-0.14.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details |
| kaiv-0.14.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| kaiv-0.14.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| kaiv-0.14.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
| kaiv-0.14.0-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 7.2 MB
Release files / kaiv-0.14.0.tar.gz
| Download URL | kaiv-0.14.0.tar.gz |
|---|---|
| Size | 17.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
870feeba418a75c0e1f89ca7f3bd6ddf319ad69e29bdc354c0320f8a7706d0f3
|
|
BLAKE2b-256 checksum How to use checksums |
3fea8424ebcfe58df65457f4a2595349d7687410384e2935bae9709cea495780
|
| 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 Oct 6, 2026.
Transparency logRelease files / kaiv-0.14.0-cp39-abi3-win_amd64.whl
| Download URL | kaiv-0.14.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
9583485856fc09f0d6d36cc73053aebe3d99ece5c74e0854657f261657baf135
|
|
BLAKE2b-256 checksum How to use checksums |
5d83ead40e7be1259745498cf892414ef4e07dca7f3f83fdf51cf534aab8b117
|
| 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 Oct 6, 2026.
Transparency logRelease files / kaiv-0.14.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | kaiv-0.14.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
186c349f9e4e49dbcdac19e5f05640aa29396c489ebb0285f93836a9474f6479
|
|
BLAKE2b-256 checksum How to use checksums |
e52a7357f642c0cfa0b9cfc323758ae939e5726ca2199ecb0598af6fe32ab659
|
| 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 Oct 6, 2026.
Transparency logRelease files / kaiv-0.14.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | kaiv-0.14.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
12e00150d46a391f2e33d291eee6c133bd6b85de92532e2b0e0f99ff568a649a
|
|
BLAKE2b-256 checksum How to use checksums |
637ebe0b456531ae89540fcda98f979af4048ba99e3f1ed97c1f4234669468e8
|
| 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 Oct 6, 2026.
Transparency logRelease files / kaiv-0.14.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | kaiv-0.14.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b1906d0865fe97540b7212c2906a95ea492eb6a389bcefce40d656f7fb57538e
|
|
BLAKE2b-256 checksum How to use checksums |
07b107583daa48fae4e6d5610fa548851c5e29193bc54eebb472baed81b3244b
|
| 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 Oct 6, 2026.
Transparency logRelease files / kaiv-0.14.0-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | kaiv-0.14.0-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
e910b987e5a32915aa2a50f555d8f19f9b54cb11c9684e6b61505aefbed60003
|
|
BLAKE2b-256 checksum How to use checksums |
e3a58df7510f7345dbe4c1bf7967368a86f1a262ace4b6e82ddef473ad0095bf
|
| 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 Oct 6, 2026.
Transparency log