Skip to main content

Fast SQLite ORM with schema validation

Project description

QuantumForge ORM

A next-generation ultra-high-performance Python ORM forged for speed, streaming, and massive data operations.

🚀 Overview

QuantumForge ORM is a high-performance Python ORM designed from the ground up to handle massive datasets, dynamic SQL, and extreme-speed operations using:

  • Turbo PRAGMAs
  • Intelligent chunking
  • Streaming processors
  • Dynamic WHERE builders
  • Auto-optimizing DELETE, UPDATE and INSERT
  • Full SQL flexibility with Python expressiveness

✨ Key Features

  • Ultra-fast INSERT engine (5 million rows in ~5s)
  • Intelligent chunk size detection
  • Dynamic WHERE builder
  • Streaming updates & deletes
  • Type validation for primary keys
  • LIKE, BETWEEN, IN, and all comparison operators
  • Auto-VACUUM for massive deletes
  • PRAGMA turbo mode
  • Modular engines (SQLite, MySQL, Oracle)
  • Mini-DSL for flexible filters
  • 100% Python

🔥 Benchmarks

Operation Rows Time
Massive insert 5,000,000 ~5.7 seconds
Massive insert 50,000,000 ~50 seconds
Dynamic update millions < 0.5 seconds
Streaming delete millions instant + progress

🛠 Installation

pip install quantumforge

🧱 Usage Examples

1. Connect

db = SQLiteORM("productos.db")
db.conect_DB()

# 2. Insert

# Simple

db.insert(
    table_name="productos",
    items=[ "producto_x", 10.5, "2023-01-01", 1, 1]
)

# Massive

db.insert_many(
    table_name="productos",
    items=[
        ("producto_x", 10.5, "2023-01-01", 1, 1)
        for _ in range(5_000_000)
    ]
)

# 3. UPDATE

db.update(
    set_values={"nombre": "nuevo", "precio": 50},
    data=["id_producto", "IN", (1,2,3)],
    table_name="productos"
)

"""  Update all records with nombre and precio column"""
db.update(
    set_values={"nombre": "nuevo", "precio": 50},
    table_name="productos"
)

# OTHER UPDATE AND DELETE ALTERNATIVES 
# In case you want delete or update all records without necesity on seeting arguments, take those two functions
# ⚠️ Use delete_all() carefully. This operation removes every row from the table.

db.delete_all(table_name="productos")
db.update_all(set_values={"nombre": "nuevo", "precio": 50}, table_name="productos")

# 4. DELETE with and without conditions

db.delete(
    data=["precio", ">", 100],
    table_name="productos"
)

"""  Delete all records """
db.delete(
    table_name="productos"
)

# 5 

🧠 Architecture

SQLiteORM.py  Main engine

MySQLORM.py  MySQL adapter (in progress)

OracleORM.py  Oracle adapter (in progress)

builders/  WHERE, SET, placeholders builders

stream/  streaming operations

optimizers/  pragma, vacuum, analyze

🧩 Roadmap

Full MySQL engine

Full Oracle engine

QueryBuilder

Model-based ORM layer

Automatic migrations

Batch UPDATE & DELETE

Foreign key inspector

PyPI release


👨‍💻 Author

Iván González Valles
[GitHub(https://github.com/ivanarganda)]

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

ivbox-0.1.1.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

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

ivbox-0.1.1-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

Details for the file ivbox-0.1.1.tar.gz.

File metadata

  • Download URL: ivbox-0.1.1.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for ivbox-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0c373d4329314898d916ba70a4af9b1a6af55800db22a4bc176f671d50c9cab3
MD5 99c70d872e27c620fee863003279023c
BLAKE2b-256 a321d92f3af47ed6467b8c7cc2ffd1a766bed57e072b5589185182a6eb06cffb

See more details on using hashes here.

File details

Details for the file ivbox-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ivbox-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for ivbox-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eea35267787e9a09aeafbee9b74d249be38d32b59b53b48440353e392ba792dd
MD5 6a9d9e8ff3960c7565dfae82b64dd97f
BLAKE2b-256 30dc53dc07d8466dbccaeed91ee1004ba69118645dc512f699a7063a519cbed3

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