SoketDB v2.0 — A production-ready, PostgreSQL-like database with AI-powered queries, automatic cloud backup, encryption, MVCC transactions, indexes, constraints, and zero setup.
Project description
⚡ SoketDB v2.0 — The Production-Ready Database That Runs Anywhere
No setup. No servers. No compromises. SoketDB v2.0 transforms from a simple JSON database into a full-featured, ACID-compliant database engine with PostgreSQL-like capabilities — while maintaining zero setup and offline-first philosophy.
🎊 MAJOR UPGRADE: SoketDB v2.0
This is NOT just an update — it's a complete reimagining of what SoketDB can be.
The original SoketDB was a smart JSON database. SoketDB v2.0 is now a production-ready database engine with all the features you'd expect from PostgreSQL, but with zero setup and AI-powered queries.
✨ What's New in v2.0:
🏛️ PostgreSQL-Like Architecture
- Write-Ahead Logging (WAL) — Guaranteed durability and crash recovery
- Multi-Version Concurrency Control (MVCC) — Full transaction isolation levels
- Connection Pooling — Proper database connections with
ConnectionandCursorobjects - ACID Compliance — Atomicity, Consistency, Isolation, Durability
📊 Advanced Query Features
- Full JOIN Support — Inner, Left, Right, and Cross joins
- Subqueries & CTEs — Common Table Expressions for complex queries
- Window Functions — ROW_NUMBER(), RANK(), LEAD(), LAG()
- Aggregate Functions — COUNT, SUM, AVG, MIN, MAX with GROUP BY
- Full-Text Search — Built-in search capabilities
🔧 Database Objects
- Indexes — B-tree, Hash, and GIN (Generalized Inverted Index) for JSON
- Constraints — PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL, CHECK, DEFAULT
- Sequences — Auto-incrementing columns
- Views — Virtual tables based on queries
- Stored Procedures — Custom functions (coming soon)
🔐 Enterprise Security
- Production Encryption — AES-256 encryption for data at rest
- Automatic Key Management — Secure key generation and storage
- Encrypted Backups — All cloud backups are encrypted
- Environment Variable Support — Secure credential management
☁️ Intelligent Cloud Integration
- Automatic Backup Restoration — Always queries from backup for latest data
- Hard Read/Write — Guaranteed persistence with multiple backup layers
- Smart Caching — Always fetches latest data without explicit restore()
- Multi-Provider Support — HuggingFace, Google Drive, AWS S3, Dropbox
🧠 Enhanced AI Engine
- Natural Language to SQL — Even smarter query translation
- Query Optimization — Automatic execution plan generation
- Query Caching — 5-minute cache for frequently run queries
- Performance Stats — Detailed database performance metrics
📋 New Database Objects & Methods
# Connections & Cursors (like PostgreSQL)
conn = db.get_connection()
cursor = conn.cursor()
cursor.execute("SELECT * FROM users")
row = cursor.fetchone() # ✅ YES, fetchone() works!
rows = cursor.fetchall()
batch = cursor.fetchmany(10)
# Transactions with isolation levels
conn.begin(isolation_level=IsolationLevel.SERIALIZABLE)
try:
conn.execute("UPDATE accounts SET balance = balance - 100 WHERE id = 1")
conn.execute("UPDATE accounts SET balance = balance + 100 WHERE id = 2")
conn.commit()
except:
conn.rollback()
# Indexes
db.create_index("users", "email", IndexType.BTREE)
db.create_index("users", "metadata", IndexType.GIN) # For JSON fields
# Constraints
db.add_constraint("users", "pk_users", ConstraintType.PRIMARY_KEY, ["id"])
db.add_constraint("users", "unique_email", ConstraintType.UNIQUE, ["email"])
db.add_constraint("users", "age_check", ConstraintType.CHECK, ["age"], check_expr="age >= 0 AND age <= 150")
# Advanced queries
result = db.execute("""
WITH user_orders AS (
SELECT u.name, COUNT(o.id) as order_count
FROM users u
LEFT JOIN orders o ON u.id = o.user_id
GROUP BY u.id, u.name
)
SELECT name, order_count,
RANK() OVER (ORDER BY order_count DESC) as rank
FROM user_orders
""")
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 soketdb-2.0.0.tar.gz.
File metadata
- Download URL: soketdb-2.0.0.tar.gz
- Upload date:
- Size: 70.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a352e0271c868dde338f78964aaa8607d8b38a392d958a662ddfdfe3d6adcce
|
|
| MD5 |
c5d9ab8f34d268689c858c544641464f
|
|
| BLAKE2b-256 |
dc55427f364904a941c3316a0b621bc6a0dc49104695e205b8f95dac8417da5b
|
File details
Details for the file soketdb-2.0.0-py3-none-any.whl.
File metadata
- Download URL: soketdb-2.0.0-py3-none-any.whl
- Upload date:
- Size: 68.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
619a8946e7fadace6670327b25c75b52469e7be53024d50921f4382e8f4dc251
|
|
| MD5 |
c6888a0f936361bf8a37c99adc97f386
|
|
| BLAKE2b-256 |
08370d2d962ac4877a02ab549d77b58ce7f9f51e2a285ddde7e650452be49e39
|