Skip to main content

uor-addr (Python)

Python bindings for uor-addr — typed content-addressing producing deterministic blake3:<64hex> κ-labels from JSON, S-expressions, XML, ASN.1 DER, schema.org, in-toto, and more.

Wraps the uor-addr-c C ABI dynamic library via ctypes (stdlib — no external dependencies). The produced κ-label is byte-for-byte identical to the Rust crate's output.

Install

pip install uor-addr

Requires Python 3.10+. Wheels ship per-platform; sdist falls back to building from the workspace.

Quickstart

from uor_addr import kappa

label = kappa.json_address(b'{"foo":"bar"}')
print(label)
# blake3:16b6abe0a77021b88cc14863d696df0c34f82556faadb318f46c384184f8ea71

API

Nine *_address methods on the kappa singleton, one per realization. Each takes bytes-like and returns the 71-byte ASCII blake3:<64-lowercase-hex> κ-label as str. Failures raise uor_addr.AddressError carrying one of three kind tags ('invalid-input' / 'too-large' / 'pipeline-failure').

Method Realization Imported spec
kappa.json_address JSON RFC 8259 + RFC 8785 JCS + UAX #15 NFC
kappa.sexp_address S-expressions Rivest 1997 canonical form
kappa.xml_address XML W3C XML-C14N 1.1 (subset)
kappa.asn1_address ASN.1 ITU-T X.690 DER
kappa.ring_address Ring elements UOR-Framework Amendment 43 §2
kappa.codemodule_address Code-module AST CCMAS
kappa.schema_photo_address schema.org/Photograph schema.org/Photograph
kappa.schema_document_address schema.org/Article (+ subtypes) schema.org/Article
kappa.schema_codemodule_signed_address in-toto Statement v1 in-toto Statement v1

Determinism + canonical-form invariance

from uor_addr import kappa

# JSON: whitespace, key order, NFC vs NFD all collapse.
a = kappa.json_address(b'{"a":1,"b":2}')
b = kappa.json_address(b'{ "b" : 2 , "a" : 1 }')
assert a == b

# But typed values that look similar produce distinct κ-labels.
int_label = kappa.json_address(b"42")
str_label = kappa.json_address(b'"42"')
assert int_label != str_label

TC-05 replay across the FFI boundary

Each *_address_with_witness method returns a Grounded handle carrying the ψ-pipeline's emitted derivation. Calling grounded.verify() replays the derivation through prism_verify::certify_from_trace and returns the recovered κ-label without re-invoking SHA-256. The verifier reads the trace events the source pipeline emitted and re-packages the certified output (QS-05 replay equivalence; CL-R* in CONFORMANCE.md).

from uor_addr import kappa

with kappa.json_address_with_witness(b'{"foo":"bar"}') as grounded:
    print(grounded.kappa_label())
    # blake3:16b6abe0a77021b88cc14863d696df0c34f82556faadb318f46c384184f8ea71

    assert grounded.verify() == grounded.kappa_label()
    # TC-05 round-trip; SHA-256 was not re-invoked.

    fingerprint: bytes = grounded.content_fingerprint()
    # 32-byte content fingerprint (distinct from the κ-label hex
    # suffix — it is prism's content-address of the Grounded's full
    # state, used for replay verification).

The Grounded handle is freed on __exit__ of the with block; otherwise it is freed at garbage-collection time. Cross-process attestation is not supported (the underlying Trace<256> constructor is pub(crate) in uor-foundation); for that, persist the κ-label itself and re-mint at the verifier side.

Why C ABI rather than WASM?

The @uor-foundation/uor-addr npm package wraps the WASM Component Model artifact via jco. Python's wasmtime-py does not yet expose the Component Model API (24.x ships core-module support only); pivoting to wasm would require either waiting for upstream or pulling in a less-mature runtime. The C ABI path is faster (native code), more compact (no wasm runtime in the wheel), and produces the same κ-label byte-for-byte. The uor-addr-c native library is bundled per-platform in the wheel.

Byte identity with the Rust crate

The κ-label this package produces is byte-for-byte identical to uor_addr::<realization>::address(input).address from the Rust crate (and to @uor-foundation/uor-addr npm's output). Cross-validation is pinned by the CF-C* invariant class in CONFORMANCE.md.

License

Apache-2.0.

Metadata

Release files for uor-addr 0.4.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 uor-addr 0.4.0
File Actions
uor_addr-0.4.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for uor_addr-0.4.0-py3-none-win_amd64.whl
uor_addr-0.4.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for uor_addr-0.4.0-py3-none-manylinux_2_28_x86_64.whl
uor_addr-0.4.0-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for uor_addr-0.4.0-py3-none-manylinux_2_28_aarch64.whl
uor_addr-0.4.0-py3-none-macosx_11_0_x86_64.whl Python 3 none macOS 11.0+ x86-64 Details for uor_addr-0.4.0-py3-none-macosx_11_0_x86_64.whl
uor_addr-0.4.0-py3-none-macosx_11_0_universal2.whl Python 3 none macOS 11.0+ universal2 (ARM64, x86-64) Details for uor_addr-0.4.0-py3-none-macosx_11_0_universal2.whl

Total release size: 2.1 MB

Release files / uor_addr-0.4.0-py3-none-win_amd64.whl

Download URL uor_addr-0.4.0-py3-none-win_amd64.whl
Size 336.5 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
83928be7874f0e865ed67cf0342cfc903e0e90d217d1da31cb0487e5dec5aab2
BLAKE2b-256 checksum
How to use checksums
2c10496caab6909e578be13eba885f8e5adccd1fe06c15e7f3831df089a0b864
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 17, 2026.

Transparency log

Release files / uor_addr-0.4.0-py3-none-manylinux_2_28_x86_64.whl

Download URL uor_addr-0.4.0-py3-none-manylinux_2_28_x86_64.whl
Size 473.1 kB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c8b00d3cac7360aec103c5bdff9432e20100eab13242fe92ea9fae6f9c8a7dd7
BLAKE2b-256 checksum
How to use checksums
97c8702f1630fcc7f7541b8947eddfe0f044efbd9940c5594847869db1cd46e9
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 17, 2026.

Transparency log

Release files / uor_addr-0.4.0-py3-none-manylinux_2_28_aarch64.whl

Download URL uor_addr-0.4.0-py3-none-manylinux_2_28_aarch64.whl
Size 445.2 kB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
2193e7502764018e58b579858f0b98d25812e8804cd7747abf7ded7b569cd198
BLAKE2b-256 checksum
How to use checksums
52429f6a07ca785d896994f9a37d75d9034698e333dc88931aca2dbd8c3537e0
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 17, 2026.

Transparency log

Release files / uor_addr-0.4.0-py3-none-macosx_11_0_x86_64.whl

Download URL uor_addr-0.4.0-py3-none-macosx_11_0_x86_64.whl
Size 441.2 kB
Tags Python 3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
350dc8217cb3d0e9a4603de5c2629678453c1b2e681991da2ec9bc03baa1761f
BLAKE2b-256 checksum
How to use checksums
e0e937987907615f47aaf4a5c22d592740ff81e2be06d697f11ad607ca1d20f3
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 17, 2026.

Transparency log

Release files / uor_addr-0.4.0-py3-none-macosx_11_0_universal2.whl

Download URL uor_addr-0.4.0-py3-none-macosx_11_0_universal2.whl
Size 404.8 kB
Tags Python 3 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
243d62b80827864ae02b93a2d162c545d2448c8f67c7146ccdd529ddd7149e85
BLAKE2b-256 checksum
How to use checksums
c937933b33bbabb5840321b31ec5c65f7268a362bf0dc8a33e34d7ccf728c71d
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 17, 2026.

Transparency log

Security for uor-addr 0.4.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 uor_addr-0.4.0-py3-none-win_amd64.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 17, 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