# O(1) lookups - Always fast
doc = client.get(doc_id)
# Sub-millisecond response time✨ In-memory operations |
# Crash? No problem.
# WAL recovery restores everything✨ Write-Ahead Logging (WAL) |
# One line to start
docker run -p 8000:8000 ashfromsky/yaradb✨ RESTful API + OpenAPI docs |
# Free mode or strict schemas
# Your choice, your rules✨ Schema-free OR JSON Schema |
|
Linux / macOS: docker pull ashfromsky/yaradb:latest
docker run -d \
--name yaradb_server \
-p 8000:8000 \
-v $(pwd)/data:/data \
ashfromsky/yaradb:latestWindows (PowerShell): docker pull ashfromsky/yaradb:latest
docker run -d `
--name yaradb_server `
-p 8000:8000 `
-v ${PWD}/data:/data `
ashfromsky/yaradb:latestWindows (CMD): docker pull ashfromsky/yaradb:latest
docker run -d ^
--name yaradb_server ^
-p 8000:8000 ^
-v %cd%/data:/data ^
ashfromsky/yaradb:latestRecommended • Production-ready |
services:
yaradb:
image: ashfromsky/yaradb
ports: ["8000:8000"]
volumes: ["./data:/data"]Easy • One command deploy |
git clone https://github.com/illusiOxd/yaradb
cd yaradb
pip install -r requirements.txt
python main.pyDevelopment • Full control |
Verify it's running:
curl http://localhost:8000/ping
# {"status":"alive"} ✅Explore the API:
👉 http://localhost:8000/docs 👈
# Create a document
curl -X POST http://localhost:8000/document/create \
-H "Content-Type: application/json" \
-d '{
"table_name": "users",
"body": {
"name": "Alice",
"email": "alice@example.com",
"role": "admin"
}
}'# Get by ID
curl http://localhost:8000/document/get/{doc_id}# Update with version control
curl -X PUT http://localhost:8000/document/update/{doc_id} \
-d '{"version": 1, "body": {"name": "Alice Smith"}}'# Soft delete
curl -X PUT http://localhost:8000/document/archive/{doc_id} |
Install: pip install yaradb-clientUse: from yaradb_client import YaraClient
client = YaraClient("http://localhost:8000")
# Create
doc = client.create(
table_name="users",
body={
"name": "Alice",
"email": "alice@example.com",
"level": 5
}
)
# Read
user = client.get(doc["_id"])
# Update (with optimistic locking)
updated = client.update(
doc_id=doc["_id"],
version=doc["version"],
body={"name": "Alice", "level": 6}
)
# Search
results = client.find({"level": 6})
# Archive (soft delete)
client.archive(doc["_id"]) |
╔══════════════════════════════════════════════════════════════╗
║ 🌐 FastAPI REST API ║
║ (OpenAPI • JSON • HTTP/2) ║
╚═════════════════════════════╤════════════════════════════════╝
│
▼
╔══════════════════════════════════════════════════════════════╗
║ 💾 In-Memory Hash Index ║
║ { UUID → Document } - O(1) Lookup ║
╚═════════════════════════════╤════════════════════════════════╝
│
┌─────────┴─────────┐
▼ ▼
╔═══════════════════╗ ╔═══════════════════╗
║ 📝 WAL Engine ║ ║ 🔐 OCC Locking ║
║ Append-Only Log ║ ║ Version Control ║
╚═════════╤═════════╝ ╚═══════════════════╝
│
▼
╔═══════════════════╗
║ 💿 JSON Storage ║
║ Periodic Snapshot ║
╚═══════════════════╝
~2ms latency |
<1ms latency |
Automatic on startup |
Background process |
|
Full guides, tutorials, and best practices |
REST endpoints, schemas, and examples |
WAL internals, OCC, and design decisions |
We ❤️ contributions from the community!
Whether you're fixing bugs, adding features, improving docs, or sharing ideas — you're welcome here.
|
Found an issue? |
Have an idea? |
Make it clearer |
Fork • Code • PR |
Read our Code of Conduct • Contributing Guide
Server Side Public License (SSPL)
© 2025 Tymofii Shchur Viktorovych
Free for development and internal use • Contact for commercial SaaS deployment





