Skip to main content

tensordb

Python bindings for TensorDB — a bitemporal ledger database with MVCC, SQL, and LSM storage.

Install

pip install tensordb

Quick Start

from tensordb import PyDatabase
import json

# Open (or create) a database
db = PyDatabase.open("/tmp/mydb")

# Insert a document
doc = json.dumps({"name": "Alice", "age": 30}).encode()
db.put(b"user:1", doc, 0, 2**63 - 1)

# Point read
data = db.get(b"user:1")
print(json.loads(data))  # {'name': 'Alice', 'age': 30}

# SQL query
db.sql("CREATE TABLE users (id INT, name TEXT, age INT)")
db.sql("INSERT INTO users VALUES (1, 'Alice', 30)")
rows = db.sql("SELECT * FROM users WHERE age > 25")
print(rows)

API

PyDatabase.open(path, shard_count=None)

Open or create a database at path.

db.put(key, doc, valid_from, valid_to)

Insert a document. Returns the commit timestamp.

db.get(key, as_of=None, valid_at=None)

Read a document by key. Supports bitemporal queries.

db.sql(query)

Execute a SQL statement. Returns rows or affected-row metadata.

License

PolyForm Noncommercial 1.0.0

Metadata

Release files for tensordb 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for tensordb 0.3.0
File Interpreter ABI Platform Actions
tensordb-0.3.0-cp313-cp313-manylinux_2_34_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.34+ ARM64 Details for tensordb-0.3.0-cp313-cp313-manylinux_2_34_aarch64.whl

Release files / tensordb-0.3.0-cp313-cp313-manylinux_2_34_aarch64.whl

Download URL tensordb-0.3.0-cp313-cp313-manylinux_2_34_aarch64.whl
Size 2.7 MB
Tags CPython 3.13 Linux glibc 2.34+ ARM64
SHA-256 checksum
How to use checksums
331275c3c86a5356a985b672003a9aa490e0cbc08fc15e5ddf708c358c958d37
BLAKE2b-256 checksum
How to use checksums
5219b8421dad57f60aa40963f4339505f5b9bdebe8c84c327386de44470e1d65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Security for tensordb 0.3.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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