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.5.tar.gz (756.3 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.5-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.5-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.5-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.5-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.5-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.5.tar.gz.

File metadata

  • Download URL: turndb-0.1.5.tar.gz
  • Upload date:
  • Size: 756.3 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.5.tar.gz
Algorithm Hash digest
SHA256 ad7b01742e22a5f95558bb65a7bb241735155c73853fb6b106a583c7456a1974
MD5 8777efdf914d40c3d5912d46f06fc8ae
BLAKE2b-256 62d954f2a2b796bbde751d279d1f3a18d95c43e2183a5f0da03c425dd840871a

See more details on using hashes here.

Provenance

The following attestation bundles were made for turndb-0.1.5.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.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for turndb-0.1.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8e9f2d56a99b563c612004a6c2172577f6e351512d96c7b225c6ab1e6dee6e26
MD5 58772b551842db6fc7574d0909845630
BLAKE2b-256 e5411dcda86678b09f51bd7a42673831f96eeeb21f9bf8107dede1656bec2fb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for turndb-0.1.5-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.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for turndb-0.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 209ef07f2f1bed33fbc5abd8b8ed8ab9b1402988c9ed40e12aed36bbb80b4079
MD5 94fb93c7073c56f793af695271781328
BLAKE2b-256 53a1dd8272afe138645eb62e2c2714e3af26b3173375ac39dc8fc8dbfde5c61c

See more details on using hashes here.

Provenance

The following attestation bundles were made for turndb-0.1.5-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.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for turndb-0.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 301ceb09dd9a6c0a9c3c86372c3fc1083d9cc033549ac0227d9fb9a07d157f2a
MD5 bb61136c430ef1a7b3b2fc009958273c
BLAKE2b-256 46b89b8a81b0af7cee9a4c1e51e81c3569aff67eeb70d0a1259012f294d47191

See more details on using hashes here.

Provenance

The following attestation bundles were made for turndb-0.1.5-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.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for turndb-0.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bcc1ae49d338a1c39d282edea32360ece6e1a5d1c75daa01d5b090f82d00630b
MD5 98dfa344d4bd46838fe63141da48c681
BLAKE2b-256 4a70f25dc7befb237415ae324d16bd9d9175abe6c9c8e7db1e08e43eb2aaf8cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for turndb-0.1.5-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.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for turndb-0.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1b0195b7876bd9c1cdb56bb8dc23c85ea3d9cdb90756e2b8251679467b683a47
MD5 17f74808b8118ac5cd84a1b747e36de8
BLAKE2b-256 1dc2f9a47756fd0290b5e4ea7237da13f3db36b953d7c778015744cfc9cbec21

See more details on using hashes here.

Provenance

The following attestation bundles were made for turndb-0.1.5-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

This release

0.1.5 This release

6 files

0.1.4

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