Official Python client for QRTdb — Quorta Real-Time Database
Project description
qrtdb — Python Client v2.0
Official Python client for QRTdb by Quorta Software Foundation.
QRTdb is a self-hosted portable database — sector-based storage, field index for fast lookups, HTTP API.
Install
pip install qrtdb
Quick Start
from qrtdb import QRT
# Step 1 — Connect with master key
master = QRT("http://your-server:8000", api_key="qrt-...")
# Step 2 — Create a database (returns scoped key)
scoped_key = master.create_database("myapp")
# Step 3 — Connect with scoped key (no db= needed on every query)
db = QRT("http://your-server:8000", api_key=scoped_key)
# Step 4 — Use it
db.create_table("users")
db.insert("users", {"name": "Alex", "age": 17, "city": "Kolkata"})
db.select("users") # all records
db.select("users", where={"city": "Kolkata"}) # indexed lookup
db.delete("users", where={"name": "Alex"})
db.stats("users")
db.list_tables()
db.drop_table("users")
Storage Format
QRTdb stores data in .qrt sector files — not JSON, not SQL, not SQLite.
[SECTOR:0]
{"id":1,"name":"Alex","age":"17","city":"Kolkata"}
{"id":2,"name":"Rahul","age":"16","city":"Delhi"}
[SECTOR:1]
{"id":3,"name":"Sara","age":"15","city":"Mumbai"}
...
Field index (.idx) enables O(1) WHERE lookups:
name=Alex → 0,0
city=Kolkata → 0,0
id=1 → 0,0
Master Key vs Scoped Key
# Master key — full account access
master = QRT(url, api_key="qrt-master-...")
master.create_database("myapp") # → returns scoped key
master.list_databases()
master.list_keys()
# Scoped key — one database only, use for apps
db = QRT(url, api_key="qrt-scoped-...")
db.insert("users", {...}) # no db= needed
Error Handling
from qrtdb import QRT, AuthError, QueryError, ConnectionError
try:
db.select("nonexistent")
except QueryError as e:
print("Query failed:", e)
except AuthError as e:
print("Bad API key:", e)
except ConnectionError as e:
print("Server unreachable:", e)
Other Languages
QRTdb is HTTP — use it from any language:
// JavaScript
const res = await fetch("http://server:8000/query", {
method: "POST",
headers: { "Content-Type": "application/json", "X-API-Key": "qrt-..." },
body: JSON.stringify({ q: "SELECT FROM users" })
});
// Go
body, _ := json.Marshal(map[string]string{"q": "SELECT FROM users"})
req, _ := http.NewRequest("POST", "http://server:8000/query", bytes.NewBuffer(body))
req.Header.Set("X-API-Key", "qrt-...")
// Rust
client.post("http://server:8000/query")
.header("X-API-Key", "qrt-...")
.json(&json!({"q": "SELECT FROM users"}))
.send().await?;
About QSF
Quorta Software Foundation — Non-profit · Est. 2026 · Closed Source · Members & Founders Only
| Product | Status |
|---|---|
| QRTdb | ✅ Live |
| QRTOS | ⚡ In Dev |
| QSDK | ⚡ In Dev |
| QDNS | ◌ Planned |
| QBit_Safe | ◌ Planned |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qrtdb-2.0.0.tar.gz.
File metadata
- Download URL: qrtdb-2.0.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37655e7b17a9bbdcb188f68b33c7e03a60eacab5521d2e132162ea138cf86877
|
|
| MD5 |
008a187cfec0d735eda6a9017c22bdf3
|
|
| BLAKE2b-256 |
e3739fbd37ff84366d27aae4b6e9d7136bbe17f97d8f447a65bb516f5395d36b
|
File details
Details for the file qrtdb-2.0.0-py3-none-any.whl.
File metadata
- Download URL: qrtdb-2.0.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cd9fb62bcfb6eaab9fc2ad1e53ea1b06090ade7166fec888c7a85c6a9ca402a
|
|
| MD5 |
1f7ff3fb150aaa7d2a7d79bce67163f8
|
|
| BLAKE2b-256 |
8c7d470c1049feb242eac50e346209fc5df93c95b49913a73e82880396370955
|