Skip to main content

SoketDB — a zero-setup, AI-smart JSON database built for developers who value speed, simplicity, and offline capability.

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 Connection and Cursor objects
  • 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


Download files

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

Source Distribution

soketdb-1.5.3.tar.gz (58.0 kB view details)

Uploaded Source

Built Distribution

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

soketdb-1.5.3-py3-none-any.whl (56.1 kB view details)

Uploaded Python 3

File details

Details for the file soketdb-1.5.3.tar.gz.

File metadata

  • Download URL: soketdb-1.5.3.tar.gz
  • Upload date:
  • Size: 58.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for soketdb-1.5.3.tar.gz
Algorithm Hash digest
SHA256 56eb2ad7651113e44f9f19e241a17f4a38e75f45aac23894fc8f9b5aedc216d7
MD5 480b31506d5cc4cde252d2cecbe11a32
BLAKE2b-256 03c8d5d94baf7517fef9f28bc657014ede579dedc28f2b75ec49bad1c2487187

See more details on using hashes here.

File details

Details for the file soketdb-1.5.3-py3-none-any.whl.

File metadata

  • Download URL: soketdb-1.5.3-py3-none-any.whl
  • Upload date:
  • Size: 56.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for soketdb-1.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ea6aa5dae981157839000664333087abef1a9e14535969f8a4d760e6e3648140
MD5 68992381839cd72f5d4872d8e6eb1b75
BLAKE2b-256 bb30724007884273990ac517cad01f14353fe76ca41a5838ba33448ee3dde3e9

See more details on using hashes here.

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