Skip to main content

TapirusDB native Python SDK

Python 3.10+ binding to the Rust engine through PyO3. This package opens actual .tapir files; it does not require a daemon. python/ is a separate legacy ctypes integration and does not define this package's API.

import tapirus

with tapirus.connect("agent.tapir") as db:
    db.execute("CREATE TABLE notes (id INTEGER PRIMARY KEY, body TEXT)")
    db.execute("INSERT INTO notes VALUES (?, ?)", [1, "Don't interpolate SQL"])
    print(db.query("SELECT * FROM notes WHERE id = ?", [1]))
    source = db.store_memory({
        "content": "The delivery arrives on Tuesday",
        "embedding": [1.0, 0.0],  # supply your model's actual embedding
        "namespace": "support",
        "session_id": "case-7",
        "tags": ["source:delivery-policy"],
    })
    print(db.search_memories({"embedding": [1.0, 0.0], "namespace": "support"}))

execute/query accept a list or tuple of bound parameters: None, bool, signed 64-bit integer, finite float, string, bytes or a finite vector list. Results are lists of dictionaries; integers retain precision and blobs return bytes. Literal question marks inside SQL strings are preserved.

store_memory, search_memories and forget_memory use the core AI memory contract. Results include source content/IDs and separate lexical, semantic and recency scores. Applications supply embeddings from a consistent model. These calls execute locally without contacting a network service. For hard per-owner namespace/session boundaries in multi-tenant servers or Rust, see MemoryAccessScope and --api-key-namespace. TAP classification/verification scores are deterministic engine scores rather than calibrated probabilities.

execute("BEGIN"), COMMIT, ROLLBACK and savepoints apply to SQL and AI memory together. The context manager closes the database on exit; it does not automatically commit an explicit transaction. close() is idempotent. It invalidates retained collection handles and releases the native connection. Connection and collection objects must stay on their creating Python thread; this module requires the GIL.

Pass a second argument to connect(path, passphrase) to open an XChaCha20-Poly1305 encrypted native .tapir database (or use TapirusWasm.new_encrypted(passphrase) in browser WASM). Use tapirus.SessionDatabase.open(path) for independently owned transactions and non-blocking snapshots.

Build and validate the wheel

The wheel also installs tapirus-migrate, tapirus-agent and tapirus-eval. See AI and embedded workflows for source upsert/batch/TTL/model contracts, sessions, SQLite migration, a runnable agent, and the optional verified local multilingual E5 ONNX backend. The ONNX runtime, tokenizer and NumPy dependencies are optional; install the onnx extra or its declared dependencies when using --backend onnx.

python -m pip install 'maturin>=1.16,<2'
maturin build --manifest-path sdks/python/Cargo.toml --locked --out target/python-wheels
python scripts/test-python-sdk.py --wheel target/python-wheels
maturin sdist --manifest-path sdks/python/Cargo.toml --out target/python-sdist
python scripts/normalize-python-sdist.py --sdist target/python-sdist --check

The consumer check installs the wheel offline into a fresh directory, writes in a subprocess, then reopens in a second process. It checks parameters, large integers, blobs, vectors, AI filters/rollback, collections, close and encrypted reopen. Local evidence covers Windows/Python 3.12; CI defines additional host/interpreter checks. Registry publication is a separate release step.

The source-package step prunes lock entries for workspace crates excluded by Maturin. It rejects registry version/checksum changes, retains other archive bytes and compiles the extracted package with --locked --offline. Python 3.12+ is required for this packaging check; the SDK itself supports Python 3.10+.

The wrapper retains its existing MIT declaration. The embedded engine uses the repository's BUSL-1.1 terms, included as CORE_LICENSE; the combined wheel is labeled MIT AND BUSL-1.1. See NOTICE for the component boundary.

Metadata

Release files for tapirus 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 tapirus 1.1.0
File Size Uploaded Provenance Actions
tapirus-1.1.0.tar.gz 761.4 kB With provenance Details for tapirus-1.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for tapirus 1.1.0
File Actions
tapirus-1.1.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for tapirus-1.1.0-cp310-abi3-win_amd64.whl
tapirus-1.1.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for tapirus-1.1.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
tapirus-1.1.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for tapirus-1.1.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
tapirus-1.1.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for tapirus-1.1.0-cp310-abi3-macosx_11_0_arm64.whl
tapirus-1.1.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for tapirus-1.1.0-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 26.6 MB

Release files / tapirus-1.1.0.tar.gz

Download URL tapirus-1.1.0.tar.gz
Size 761.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7b1b58417af4e4031d16ccf54a26f8ee5b39d5a78313ef02eb0c7b9b6f392b51
BLAKE2b-256 checksum
How to use checksums
e6580292bb2e1990f2a20030a0f62d6b65e5e350705d64694577dffb350c8fad
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 15, 2026.

Transparency log

Release files / tapirus-1.1.0-cp310-abi3-win_amd64.whl

Download URL tapirus-1.1.0-cp310-abi3-win_amd64.whl
Size 5.3 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
5a012eff0e3277b4955f16fe97ff7ca7ce86b0699effadd960616f0bad41c864
BLAKE2b-256 checksum
How to use checksums
03f18956115cb95482e43d8a7c493114e5ffb9bf29925423b9126a4dcd13bac1
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 15, 2026.

Transparency log

Release files / tapirus-1.1.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL tapirus-1.1.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 5.4 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
c45e8c15d6e0ff6778e85b4c6abdb963b55cd585d5784e2f28beab25e4a7624a
BLAKE2b-256 checksum
How to use checksums
9bcbc2f06a6def8073f6c4b313b44a2cafa4f1ab4b4bc0c35b920934dbd368a7
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 15, 2026.

Transparency log

Release files / tapirus-1.1.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL tapirus-1.1.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 5.1 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
5dac820036b4f38629bd4f9009b02a3cfd7915a92b1612ea6969628e3c37602a
BLAKE2b-256 checksum
How to use checksums
deaa9268f41792a93ad5503b8845237c77d57d12c2c8ead79725d7b42ade8b30
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 15, 2026.

Transparency log

Release files / tapirus-1.1.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL tapirus-1.1.0-cp310-abi3-macosx_11_0_arm64.whl
Size 4.8 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a2c36332b27ad5321634627a07f7e9756f5cbbbad7c7479a485af9dc689b575b
BLAKE2b-256 checksum
How to use checksums
894ce7f28a68a63931341aa06ecad7fb8b69dc9992d9d67db8876719fd3fa2b7
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 15, 2026.

Transparency log

Release files / tapirus-1.1.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL tapirus-1.1.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 5.3 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
bbd6a0dc77b9d305d610b324296d8a9e315636a4d21e01c79f12f2380a311325
BLAKE2b-256 checksum
How to use checksums
9ca93e4a8765da55f9016032bea00a9684c3802e6662c4355766bd42d6f38a0a
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 15, 2026.

Transparency log

Security for tapirus 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 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for tapirus-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 Nov 15, 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