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.

from turndb import Store

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

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 syncs and flushes 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

turndb-0.1.4.tar.gz (750.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

turndb-0.1.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

turndb-0.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

turndb-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

turndb-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

turndb-0.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

Details for the file turndb-0.1.4.tar.gz.

File metadata

  • Download URL: turndb-0.1.4.tar.gz
  • Upload date:
  • Size: 750.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for turndb-0.1.4.tar.gz
Algorithm Hash digest
SHA256 274a7bcf364c0044125912a701c589c3c5c6cb68b932f671fa3140837dbe0c39
MD5 1e300b2ee59c9eacb281f0612b92cdbd
BLAKE2b-256 55a012fcf381bfbff2a18d08278edbec8a2f7724ff527f89e9639ae63a4809a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for turndb-0.1.4.tar.gz:

Publisher: release.yml on turndb/turndb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file turndb-0.1.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for turndb-0.1.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a1a8b588a9ef78a8094935596e7affe75df25ef3d496858f0adcea75f4236c76
MD5 18269ad3b10f4c8e2f82bc905514af1e
BLAKE2b-256 f61ba9dece49d4a08453a85b530b15fde291280fc28221f49cf7fde0f768d51e

See more details on using hashes here.

Provenance

The following attestation bundles were made for turndb-0.1.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on turndb/turndb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file turndb-0.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for turndb-0.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2c0a83d8d407ddb42bec6a0c368c4c508f6c108129fd175f904691c4d5afbe0d
MD5 290e7032d5e7f2c6b0a8ed99c47a2c73
BLAKE2b-256 18f2b6312d434f766c78ebf4513cf4ebd81635169e288f2756f70998fc423b9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for turndb-0.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on turndb/turndb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file turndb-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for turndb-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 102b100d59415782dcdcd6b3d2aba5a8fc061fd3eb749ae997c8e560b7d7fbcc
MD5 4a4ddaafa7ac26dd4b0adb5a61d5f7a4
BLAKE2b-256 b16ab9e2aad7c03ed89f3b293dc5c33dfec8bac4be53433207145aa77a50ea4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for turndb-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on turndb/turndb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file turndb-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for turndb-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 42fa41c4caf4cbacaf1769abf73aec992b08964a23048247325217193b230217
MD5 a6ed8f2d8c3ad43e0abcbc4c5261eb53
BLAKE2b-256 08dde6e66cd732b5e31dbebc328d4e3565203f7d2484532cf8893fec1f55410c

See more details on using hashes here.

Provenance

The following attestation bundles were made for turndb-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on turndb/turndb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file turndb-0.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for turndb-0.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0ecfd660ad4c2f4dac485cab2f504da3ede656aa11f1a03215846300441b19bb
MD5 7e6a2fb9a3a2f19e136c279c828fcbba
BLAKE2b-256 e54311727701d5e9030c0ada388045f549fdbd4ccfa7a4444d8e917c8310c47e

See more details on using hashes here.

Provenance

The following attestation bundles were made for turndb-0.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on turndb/turndb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.6

6 files

0.1.5

6 files

This release

0.1.4 This release

6 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page