Skip to main content

turndb for Python

The Python SDK is a thin PyO3 shell over TurnDB's single-file engine. It uses the same capability and structured-query contract as Rust and Node. One dedicated Rust actor owns each writer, so Python threads never concurrently enter mutable engine state.

What this package does not carry, so you choose it knowing: the columnar/Arrow lens and SQL (columnar: false, arrowIpc: false, sql: false) and cooperative cancellation of scans and lifecycle operations (cancellation: {scan: false, lifecycle: false}). turndb.capabilities() reports exactly these; a consumer that needs SQL or cancellation uses the Rust crate or the native Node package. Wheels are Linux x86-64 (manylinux); other platforms build from the sdist.

from turndb import Store

db = Store.open("agent.turndb")
db.write([{"kind": "put", "id": "trace/1", "attrs": [], "contents": []}], durable=True)
db.backup("agent-backup.turndb")
db.close()

The backup result's string-valued commit field is the public store-authority encoding: "0" means the canonical origin and a positive decimal value means that numbered manifest revision. Zero never denotes a manifest revision.

close() releases the handle without synchronizing or publishing by default. Pass close(durable=True) to synchronize, publish the pending change set, leave the store settled, and remove the WAL sidecar; otherwise call sync() or flush() first according to the guarantee you need.

Attributes, writes, scan requests, and scan results use the canonical data shapes in conformance/v1/query.schema.json. Content bytes in those serializable shapes are base64. The direct read_content() convenience returns bytes.

OpenTelemetry is the Tier-2 entrance. With an SDK provider already configured, tracing to one local file is two lines:

exporter = TurnDbSpanExporter("agent.turndb")
provider.add_span_processor(BatchSpanProcessor(exporter))

The exporter durably acknowledges each export by default, publishes after 512 spans or five seconds, and always synchronizes durability and publishes on force_flush() and shutdown().

Provider SDKs remain optional. trace_gen_ai_call() and trace_gen_ai_call_async() wrap any client closure in the canonical gen_ai CLIENT span, move input/output message arrays onto the content-bearing attributes consumed by the exporter, and preserve the exact return value or exception.

Release files for turndb 0.2.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 turndb 0.2.0
File Size Uploaded
turndb-0.2.0.tar.gz 874.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for turndb 0.2.0
File
turndb-0.2.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
turndb-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
turndb-0.2.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
turndb-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
turndb-0.2.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
turndb-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
turndb-0.2.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
turndb-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
turndb-0.2.0-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
turndb-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details

Total release size: 80.0 MB

Release files / turndb-0.2.0.tar.gz

Download URL turndb-0.2.0.tar.gz
Size 874.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5d0c7043bbad80fb32b5e50b0a6a4d612eb6a1696e3813afc760ff29ddaf063b
BLAKE2b-256 checksum
How to use checksums
f68b2d5616e09c06a92f3a6d64c4ae1e73274ea522a14eb8c0780bfb276271e2
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 Sep 6, 2026.

Transparency log

Release files / turndb-0.2.0-cp313-cp313-win_amd64.whl

Download URL turndb-0.2.0-cp313-cp313-win_amd64.whl
Size 1.3 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
4c8810f6cb20566dcfd317f225c5c60cb7953333f7cb4bf40e42be88db14b46a
BLAKE2b-256 checksum
How to use checksums
9fcacfbf807eb26d11b70628d3b6d6e54e12b1f83d78aa40d92bd004cd0bd2d8
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 Sep 6, 2026.

Transparency log

Release files / turndb-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL turndb-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 14.6 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
bc4de76474c66c415574187ef641c420655ce848268a09456f4301201dfe8029
BLAKE2b-256 checksum
How to use checksums
a6aaad8406fe9790bf9b3e440dee7a2d1425364242743e9832434b0f243bfb96
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 Sep 6, 2026.

Transparency log

Release files / turndb-0.2.0-cp312-cp312-win_amd64.whl

Download URL turndb-0.2.0-cp312-cp312-win_amd64.whl
Size 1.3 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
45301ebbc5a422cb32a85b1979519fb2511567cb1de7241973c095dfb30f6aa2
BLAKE2b-256 checksum
How to use checksums
eb4700902565106f4b858ad876f9e6e1260c76719801f6fc1fb16fa702d0b335
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 Sep 6, 2026.

Transparency log

Release files / turndb-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL turndb-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 14.6 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
dbf266d8a03e78180663a62595054512753199fea8f402faea48d527fee15295
BLAKE2b-256 checksum
How to use checksums
ef891102abebe02ca639e104e191b1fc2002a91c4c6212ed61991cf21b54663d
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 Sep 6, 2026.

Transparency log

Release files / turndb-0.2.0-cp311-cp311-win_amd64.whl

Download URL turndb-0.2.0-cp311-cp311-win_amd64.whl
Size 1.3 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
9042253a226ae0b7cf5df69cacc10d70586b1a153ec421fb044a887b380800ac
BLAKE2b-256 checksum
How to use checksums
46844250ac766c4997071808ef274be5fbc59c191a8b987ad86262bd1125f7a0
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 Sep 6, 2026.

Transparency log

Release files / turndb-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL turndb-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 14.5 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
07e5f8a6315ade7cd92555e117a92ad5ad587239f5c0997d7f48e776547e17bd
BLAKE2b-256 checksum
How to use checksums
af8b2d6383816d0c0fada4e38d54ffc8b4527a3ccbd553b1e1dd7daeb9ec0c7e
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 Sep 6, 2026.

Transparency log

Release files / turndb-0.2.0-cp310-cp310-win_amd64.whl

Download URL turndb-0.2.0-cp310-cp310-win_amd64.whl
Size 1.3 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
25a6269724a68422cc064dc07b2e135eabb5864fea35fb649a23abc2e33c032c
BLAKE2b-256 checksum
How to use checksums
bfb95c3d0fb510365b2f0e999716a8e346e85fe39679627899c44fcb5d2261fa
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 Sep 6, 2026.

Transparency log

Release files / turndb-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL turndb-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 14.5 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
1add77f2fa8b17734c7fe65f9fef755c96dec6aac0ba9091b387056c74765272
BLAKE2b-256 checksum
How to use checksums
5427558b1eb01b1566d454ea7135e135eebd1234a7c5760285a2a56568d77787
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 Sep 6, 2026.

Transparency log

Release files / turndb-0.2.0-cp39-cp39-win_amd64.whl

Download URL turndb-0.2.0-cp39-cp39-win_amd64.whl
Size 1.3 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
321f6f0f9a862b9f602af7582fa1ae642c2da9fa49b9476759ea8f9b8bc59dc7
BLAKE2b-256 checksum
How to use checksums
cc780cb5f0d5a15073f4ec7ffeb14a31be5dfb2c8cb91f859f4896abab65d419
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 Sep 6, 2026.

Transparency log

Release files / turndb-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL turndb-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 14.5 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
64c1007d0bc9eaf904ee2aa1d279dacf961e3350156ad76a01e9df7913d722da
BLAKE2b-256 checksum
How to use checksums
66e35cd83fa3ca95c1ae4de18649a666b5ab148d4fc11c5bc280cff613127327
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 Sep 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

11 release files

0.1.6

6 release files

0.1.5

6 release files

0.1.4

6 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