Skip to main content

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.15.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 kaiv 0.15.0
File Size Uploaded
kaiv-0.15.0.tar.gz 17.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for kaiv 0.15.0
File
kaiv-0.15.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
kaiv-0.15.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.15.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
kaiv-0.15.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
kaiv-0.15.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 7.3 MB

Release files / kaiv-0.15.0.tar.gz

Download URL kaiv-0.15.0.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
74e6527df7274b74deeb721e97d5482feb9dea7e435d93e8b51ff749328ac62f
BLAKE2b-256 checksum
How to use checksums
102a0c8fa3ef5109b4cbee777482b0476d05e02465e4af8914a98032bc770cc7
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

Release files / kaiv-0.15.0-cp39-abi3-win_amd64.whl

Download URL kaiv-0.15.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
b67e34ba24f274a1d1ad0b842981dd15680b1f52210e26d9eb7bd3ccc11911c4
BLAKE2b-256 checksum
How to use checksums
bde5c1f203d9b1e1f6f4cb78dbdf73ff379de0bbcad239abf136a8f2f4af50dc
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

Release files / kaiv-0.15.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL kaiv-0.15.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
a84a3d273a106048091de794291a2b788116b6555b6927c2e2b8d857204325a8
BLAKE2b-256 checksum
How to use checksums
af838a91df2b703048a87e309c319294e5256392afc6258e0703246c9b94fd9f
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

Release files / kaiv-0.15.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL kaiv-0.15.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
d66a62b03cd69686d3d137dc90b46f77a6789ae894da6c98eec09556339d219d
BLAKE2b-256 checksum
How to use checksums
b84702eb5346fc806c367e5d840858d699b6622a6530a6421e9a7012875affbc
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

Release files / kaiv-0.15.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL kaiv-0.15.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
4c4fb6de87f0d941fa0c36fbc9f94f1621f0960fae1ba44d18815d588bcc08c3
BLAKE2b-256 checksum
How to use checksums
2c9b2b5a3e700e6a59d83736e95417d39e77de85ea72af76eb0d9cc296339d23
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

Release files / kaiv-0.15.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL kaiv-0.15.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
349301b5f0f89f0bdb758b685ffe6cd5bafd32d939b98fe816328e3b8f54f6b1
BLAKE2b-256 checksum
How to use checksums
3e7c5a981c15f3484eaa81c0374874e5d2d6b864ceca63a07ab032b21aa5d7af
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

Release history Release notifications | RSS feed

This release

0.15.0 This release

6 release files

0.1.0

2 release files

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