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 |
Metadata
Release files for qrtdb 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| qrtdb-2.0.0.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qrtdb-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.8 kB
Release files / qrtdb-2.0.0.tar.gz
| Download URL | qrtdb-2.0.0.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
37655e7b17a9bbdcb188f68b33c7e03a60eacab5521d2e132162ea138cf86877
|
|
BLAKE2b-256 checksum How to use checksums |
e3739fbd37ff84366d27aae4b6e9d7136bbe17f97d8f447a65bb516f5395d36b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / qrtdb-2.0.0-py3-none-any.whl
| Download URL | qrtdb-2.0.0-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6cd9fb62bcfb6eaab9fc2ad1e53ea1b06090ade7166fec888c7a85c6a9ca402a
|
|
BLAKE2b-256 checksum How to use checksums |
8c7d470c1049feb242eac50e346209fc5df93c95b49913a73e82880396370955
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|