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.6.tar.gz (757.9 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.6-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.6-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.6-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.6-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.6-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.6.tar.gz.

File metadata

  • Download URL: turndb-0.1.6.tar.gz
  • Upload date:
  • Size: 757.9 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.6.tar.gz
Algorithm Hash digest
SHA256 fc74fa958cb49dc28e4d68e9fe5a2ccc73410a404e7c4ab720239b0713d219b4
MD5 3cbb35eff467130b83509ed94b0c451a
BLAKE2b-256 ad9b33dfa8c5bed441b7c41a987b63e88c86e779926113f874bca005080c3607

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for turndb-0.1.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 68d8547d5a877b3b4f291837eecabcd1d75482a01422cd212de7ea64d2263435
MD5 f5fac20b5fe030b0161455e0f6273329
BLAKE2b-256 964ab9de17f55eee1524e2a357de950687a6d6bdd361c6a6908587ba86369653

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for turndb-0.1.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7c4fae07c8732904ca716df02445e72da45d77e6c2fcd36e5994f22091c97dcb
MD5 6693490302c84e557916333f972a1a7f
BLAKE2b-256 af1ffa5f9a27d8c6252b849548c5ae963e95e9d2682286d4d56962e148d9b6e8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for turndb-0.1.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fa0eb4c0ec9fd0576abdf5f80d045228e6780d9acf74be3135b1e6b7325f69c6
MD5 bc53d707752a8104028fa780d5985809
BLAKE2b-256 1e0874d65229486d940982158610d22e772794684e476f1901bf84aa8fc0cb00

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for turndb-0.1.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 45644fb359dc863e943963595989914b7f768250651ed21b354511340ce436b7
MD5 a43c104e260a96852740b51d1f472027
BLAKE2b-256 e4d0717c821e2e2e490a8a88b0c0c1af7fc98f542b0299d59bfc6a75862a8026

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for turndb-0.1.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4bdefb775e6b481d330184258a04fd138633af22b24d5694f6ecaa82cf84331d
MD5 88c0a89c384aeabd2e85b10a790e37ad
BLAKE2b-256 e6d6685bce732d238141663ff8018ec55be66f6ab1594df4630e8475640dc040

See more details on using hashes here.

Provenance

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

This release

0.1.6 This release

6 files

0.1.5

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