Skip to main content

Data, connected. Versioned data with SQL, time travel, and cross-table ACID transactions.

Project description

rhizo

Query layer for Rhizo - versioned data with SQL, time travel, and cross-table ACID transactions.

Installation

pip install rhizo

Quick Start

import rhizo
import pandas as pd

# Open or create a database
db = rhizo.open("./mydata")

# Write data
df = pd.DataFrame({"id": [1, 2, 3], "name": ["Alice", "Bob", "Charlie"]})
db.write("users", df)

# SQL queries
result = db.sql("SELECT * FROM users WHERE id > 1")
print(result.to_pandas())

# Time travel to any version
result_v1 = db.sql("SELECT * FROM users", versions={"users": 1})

# Close when done
db.close()

Or use as a context manager:

with rhizo.open("./mydata") as db:
    db.write("users", df)
    result = db.sql("SELECT * FROM users")

Features

  • Simple API: rhizo.open() handles all setup automatically
  • SQL Queries: DuckDB-powered analytical queries
  • Time Travel: Query any historical version
  • Cross-Table ACID: Atomic transactions across multiple tables
  • Git-like Branching: Zero-copy branches for experimentation
  • Change Tracking: Subscribe to data changes

Advanced Usage

For advanced features like branching, transactions, and OLAP queries, access the underlying engine:

db = rhizo.open("./mydata")

# Branching
db.engine.create_branch("experiment")
db.engine.checkout("experiment")

# Transactions
with db.engine.transaction() as tx:
    tx.write_table("users", updated_users)
    tx.write_table("orders", new_orders)
    # Atomic commit

# OLAP queries (DataFusion)
result = db.engine.olap_query("SELECT * FROM users")

Documentation

See rhizodata.dev for full documentation.

License

MIT

Project details


Download files

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

Source Distribution

rhizo-0.1.2.tar.gz (44.5 kB view details)

Uploaded Source

Built Distribution

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

rhizo-0.1.2-py3-none-any.whl (45.7 kB view details)

Uploaded Python 3

File details

Details for the file rhizo-0.1.2.tar.gz.

File metadata

  • Download URL: rhizo-0.1.2.tar.gz
  • Upload date:
  • Size: 44.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rhizo-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e359fbc73414d79899e5f1da90687b8ee0a45e4dc6aafc4040de961078a27baf
MD5 8bc49dd1d9389599c4465c3124dca4ab
BLAKE2b-256 9c29903b6d25df890640b6fe3878977f1514d6fa4f4dcaa27e461c299cb4e41c

See more details on using hashes here.

Provenance

The following attestation bundles were made for rhizo-0.1.2.tar.gz:

Publisher: publish.yml on rhizodata/rhizo

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

File details

Details for the file rhizo-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: rhizo-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 45.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rhizo-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7c7a155712a85690080e401f53c373c398a703419f5cc52bc5023092b77611d7
MD5 21ab2980e5377b3e4c0ab60c42c11f49
BLAKE2b-256 58567b87f8b6fb19bd4a77ffc8f734bdb7ddc452a4b9ebbb5ada739ba7184a77

See more details on using hashes here.

Provenance

The following attestation bundles were made for rhizo-0.1.2-py3-none-any.whl:

Publisher: publish.yml on rhizodata/rhizo

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

Supported by

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