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

✅ New behavior (INSERT strategy)

QuantumForge now uses standard INSERT INTO instead of INSERT OR IGNORE.

Why this matters:

  • No silent skipping of rows (more predictable results).
  • You don’t need to validate/guard everything constantly to detect ignored inserts.
  • If a constraint fails (e.g., UNIQUE), you get a real error → easier debugging and correct data guarantees.

If you want “ignore duplicates” behavior, you can implement it explicitly per use-case (roadmap / optional mode).

🔥 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.2.tar.gz (22.6 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.2-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ivbox-0.1.2.tar.gz
  • Upload date:
  • Size: 22.6 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.2.tar.gz
Algorithm Hash digest
SHA256 c8f8aa86cbbaebba36bd37934cf87997427006f3b7ecfdeb23ae10ddde537277
MD5 0e9876cc2816bb256205f7ad0675a281
BLAKE2b-256 fe1917806b17580cc6e4a36dc325a72d34d3837d8644932e4bc306792e17752d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ivbox-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 22.0 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 da4852dde2b146fb6ac2d2988e9743e248d5324dc8b827f92a9d67aebcb690b7
MD5 8ad515bb9a7e95d26e9667605c7c9837
BLAKE2b-256 1b91c6a0264e7bdd295b91e460d50d5778038909633e1ad4778f63e0b25643cc

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