Skip to main content
Loss of provenance

A previous release had provenance metadata, but this release does not. View details.

Pre-release

This release is a pre-release and may not be stable for production use.

tenbri (Python)

Python bindings for Tenbri. Audit trail for AI agents: every decision signed, chained and provable. The same Rust core as the tenbri CLI and tenbrid, as an abi3 wheel for Python 3.10 and later.

pip install --pre tenbri
from tenbri import Refused, Tenbri

# A directory, file://..., s3://bucket/prefix or r2://bucket/prefix. create=True makes the stream
# and its keys (in $TENBRI_KEYS, else ~/.config/tenbri/keys) when there is none.
log = Tenbri.open("./audit/support", create=True, digest_key=b"a 32-byte secret, kept apart....")
print("pin this:", log.fingerprint)

with log.run("agent:support-assistant") as run:
    # Reads are pinned to the next decision's inputs, with a keyed digest of what was read.
    run.read("policy:refund", "14", b"refunds under 50 EUR are automatic")
    # The intent is durable before the block runs; the outcome follows: ok, refused or error.
    with run.decision("issue_refund", "stripe:ch_123"):
        pass  # issue the refund here; raise Refused(...) when your policy says no

report = log.verify(log.fingerprint)
print(report.ok, report.entries)
for m in log.query(inputs=["policy:refund@14"]):
    print(m.verification, m.entry["action"])
log.close()

decision is also a decorator; target may be computed from the arguments:

@log.decision("issue_refund", target=lambda charge, amount: f"stripe:{charge}", principal="agent:billing")
def refund(charge: str, amount: int) -> None: ...

With asyncio, AsyncTenbri has the same methods as coroutines, async with decisions and decorators of async functions. Nothing blocks the event loop, and concurrent appends share one group commit.

from tenbri import AsyncTenbri

async with await AsyncTenbri.open("s3://acme-audit/tenbri/support") as log:
    intent = await log.intent(action={"type": "reply_ticket"}, principal="agent:support")
    await log.outcome(intent, "ok")
  • Low level: log.intent(draft, **fields), log.outcome(intent, status, **fields) and log.append(entry) take format v1 drafts as dicts and return entries as stored.
  • Idempotent retries: give a draft an id (tenbri.new_id()); appending the same entry again returns the original. Every write error carries the id it was writing.
  • Errors are typed, one per stable code shared with tenbrid: TenbriError and its subclasses (StoreUnavailableError is TENBRI_STORE_UNAVAILABLE, ...), with .code, .reason (the format's error code) and .id.
  • Read-only: without the stream's keys, a stream opens read-only; verify and query work, writes raise NoSessionKeyError.
  • verify(key) is only ok against a pinned key: without one it shows that the stream agrees with its own genesis key, which proves nothing about who wrote it.

Metadata

Release files for tenbri 0.1.0b1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Loss of provenance

These files do not have provenance metadata, despite files in a prior release including this data.

We recommend further investigation before installing these files. View details.

Source distribution (sdist)

Source distribution for tenbri 0.1.0b1
File Size Uploaded Provenance
tenbri-0.1.0b1.tar.gz 134.9 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for tenbri 0.1.0b1
File
tenbri-0.1.0b1-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
tenbri-0.1.0b1-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details
tenbri-0.1.0b1-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details
tenbri-0.1.0b1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
tenbri-0.1.0b1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
tenbri-0.1.0b1-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
tenbri-0.1.0b1-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 28.7 MB

Release files / tenbri-0.1.0b1.tar.gz

Loss of provenance

This file belongs to a release without provenance metadata, despite a prior release including this data.

We recommend further investigation before installing this file. View details.

Download URL tenbri-0.1.0b1.tar.gz
Size 134.9 kB
Tags Source
SHA-256 checksum
How to use checksums
55d7ef2c1afd56c97941aa73945c80e27152c44e35ac35e4c813abba3c3fb09c
BLAKE2b-256 checksum
How to use checksums
f85b9d0a0c71045c3a2e52b7ba1b146b643f6fa08d6483dee11f416f0c7b1d25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / tenbri-0.1.0b1-cp310-abi3-win_amd64.whl

Loss of provenance

This file belongs to a release without provenance metadata, despite a prior release including this data.

We recommend further investigation before installing this file. View details.

Download URL tenbri-0.1.0b1-cp310-abi3-win_amd64.whl
Size 4.1 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
fd447e8e1c1d69bf049b1a28a9791ae7adbceed65e04d8d5c51fd005bb18ed48
BLAKE2b-256 checksum
How to use checksums
a473e8a537fcccc403999a667a759cfe22451fae338074f50567d062d3bea2db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / tenbri-0.1.0b1-cp310-abi3-musllinux_1_2_x86_64.whl

Loss of provenance

This file belongs to a release without provenance metadata, despite a prior release including this data.

We recommend further investigation before installing this file. View details.

Download URL tenbri-0.1.0b1-cp310-abi3-musllinux_1_2_x86_64.whl
Size 4.5 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
d3596b71f7512e33706e1dbbf12d0e72c2d808f8d577be96cc3726d3d271503d
BLAKE2b-256 checksum
How to use checksums
c8fad455f5bb999152c8133981f295b799cbea3f8a42575391bcc0cb998239c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / tenbri-0.1.0b1-cp310-abi3-musllinux_1_2_aarch64.whl

Loss of provenance

This file belongs to a release without provenance metadata, despite a prior release including this data.

We recommend further investigation before installing this file. View details.

Download URL tenbri-0.1.0b1-cp310-abi3-musllinux_1_2_aarch64.whl
Size 4.2 MB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
d5c206539894476c40cc8e84d1e7477d2584697d14ba9eccc7a9174942215761
BLAKE2b-256 checksum
How to use checksums
4432ca3ea4f975c3e766618a13e9e74af7f6ae96c2bf3926ebe1d4aa6d7c25dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / tenbri-0.1.0b1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Loss of provenance

This file belongs to a release without provenance metadata, despite a prior release including this data.

We recommend further investigation before installing this file. View details.

Download URL tenbri-0.1.0b1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.3 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
f8da0b4d9a625482bacc3deccabefcc5af162e838159131fc8136f92c5a65ea5
BLAKE2b-256 checksum
How to use checksums
0d6341cc29a5ef5aaf55a23ac218933a44365132b6b4c49a7c47a264877fd6f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / tenbri-0.1.0b1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Loss of provenance

This file belongs to a release without provenance metadata, despite a prior release including this data.

We recommend further investigation before installing this file. View details.

Download URL tenbri-0.1.0b1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 4.0 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
6fee42b6fe09c70ea8f98f916f5bc2ed6c3eb03616d6bd1f777ddd268fafba26
BLAKE2b-256 checksum
How to use checksums
7ce81622d33d1a40dee9f172e2ddd41cb72eda2afc462f80619ce0369b994ea8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / tenbri-0.1.0b1-cp310-abi3-macosx_11_0_arm64.whl

Loss of provenance

This file belongs to a release without provenance metadata, despite a prior release including this data.

We recommend further investigation before installing this file. View details.

Download URL tenbri-0.1.0b1-cp310-abi3-macosx_11_0_arm64.whl
Size 3.3 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a41c2e4af06c2ca87b8db585ade1bcfc75e857043cd8dc7fc9f7a0d1a4e686d5
BLAKE2b-256 checksum
How to use checksums
8c37c5afa312058b442852ebb7dc1fc87bd1d3a18a39ea3272deab394a80f719
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / tenbri-0.1.0b1-cp310-abi3-macosx_10_12_x86_64.whl

Loss of provenance

This file belongs to a release without provenance metadata, despite a prior release including this data.

We recommend further investigation before installing this file. View details.

Download URL tenbri-0.1.0b1-cp310-abi3-macosx_10_12_x86_64.whl
Size 4.2 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
d00784f778ef582bf5b3e7e074abae70c8cc069a8ef804c79e921470e7d31da4
BLAKE2b-256 checksum
How to use checksums
885b8d527ae127c7c20a0c6f735a1782ba24cca6cdede354e4cf5f7a0a955cf6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for tenbri 0.1.0b1

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.

Loss of provenance

A previous release of these files had provenance metadata, but this release does not.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Release comparison

  • Removed 0.1.0a2 8 files With provenance
  • Added 0.1.0b1 8 files Without provenance

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.

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