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 do not invoke a model or a network service. Namespace/session filters are application filters, not authorization boundaries. TAP classification/verification scores are heuristics, not calibrated probabilities or safety guarantees.

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 encrypted native database. Browser snapshots currently use unencrypted files.

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.0.4

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.0.4
File Size Uploaded Provenance Actions
tapirus-1.0.4.tar.gz 651.3 kB With provenance Details for tapirus-1.0.4.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for tapirus 1.0.4
File Actions
tapirus-1.0.4-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for tapirus-1.0.4-cp310-abi3-win_amd64.whl
tapirus-1.0.4-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.0.4-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
tapirus-1.0.4-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for tapirus-1.0.4-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
tapirus-1.0.4-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for tapirus-1.0.4-cp310-abi3-macosx_11_0_arm64.whl
tapirus-1.0.4-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for tapirus-1.0.4-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 6.2 MB

Release files / tapirus-1.0.4.tar.gz

Download URL tapirus-1.0.4.tar.gz
Size 651.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7cc935bcc4e77747f954113e4dd70057a5386d03f651f8f4afd02327bc8e0657
BLAKE2b-256 checksum
How to use checksums
0cb3481fa72decc6ed4fa2b17fc4d46cfbae4f49443ac75c2c118ee6c12c0f44
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 13, 2026.

Transparency log

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

Download URL tapirus-1.0.4-cp310-abi3-win_amd64.whl
Size 1.1 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
8f891793d23d61d8f68d9ad7bc8fb3db05c98b6646002f8f5ac70d2543939fbe
BLAKE2b-256 checksum
How to use checksums
878fb18725720b99861e64fca096a5ac1adf3482a2751116329985297e06caa6
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 13, 2026.

Transparency log

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

Download URL tapirus-1.0.4-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.2 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
8067b7021e82d9594ccb31b56b2081437fbbcab3677cc0bf491b2a18d496f3cd
BLAKE2b-256 checksum
How to use checksums
009d470f1bbd82cde2e1d14a465732b6fd393c4bc886f9fbf628e0622dae04fe
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 13, 2026.

Transparency log

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

Download URL tapirus-1.0.4-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.1 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
fcc607af9a2c01360f8336dabe290614865e6ce26d2b4c1171acbd56f4449468
BLAKE2b-256 checksum
How to use checksums
2bc70c5ab96cc25a62b1637d66b0e0a651408a9fd57b73ad69bfe90608ac88c9
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 13, 2026.

Transparency log

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

Download URL tapirus-1.0.4-cp310-abi3-macosx_11_0_arm64.whl
Size 1.0 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ca12c0fe8b292c6ac92d5b311b5dabb6dc7b5fda33e83bc090097b28123a8617
BLAKE2b-256 checksum
How to use checksums
d64b4b9a8e72aa01da03f1fa1be0f2660d2cc5d013cfb125258e50699a7ceabb
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 13, 2026.

Transparency log

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

Download URL tapirus-1.0.4-cp310-abi3-macosx_10_12_x86_64.whl
Size 1.1 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
fddd6f5930c98185e6c7a0a4c0893cd822a12bb3e1a66a5fd5b0fde25b1a9995
BLAKE2b-256 checksum
How to use checksums
a9b02f54952ce6067af92a3f414db4eeca345fce849ee6c4533a6214d103a6de
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 13, 2026.

Transparency log

Security for tapirus 1.0.4

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.0.4.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 13, 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