Ultra-fast Python ORM - 15.2x faster than SQLAlchemy with advanced features
Project description
Turbo ORM
The fastest Python ORM. 3-8x faster than SQLAlchemy, with zero external dependencies.
from turbo import Database, Model, TextField
class User(Model):
name = TextField()
email = TextField()
db = Database("app.db")
db.connect()
User.create_table(db)
user = User(name="Alice", email="alice@example.com")
user.save(db)
⚡ Performance
- 84,164 ops/sec INSERT (3.5x faster than SQLAlchemy)
- 993,911 ops/sec SELECT (192x faster than SQLAlchemy)
- 614,488 ops/sec bulk operations with turbo mode
See full benchmark comparison →
🚀 Features
Core
- Zero Dependencies - Pure Python, uses built-in
sqlite3 - Async Support - Full async/await with
aiosqlite - Migrations - Auto-diffing schema management
- CLI Tools - Project scaffolding and model generation
- Type Safe - Full IDE autocomplete support
Advanced
- Vector Search - Semantic similarity search
- CDC - Change Data Capture for real-time streaming
- Business Rules - Declarative validation engine
- RBAC - Role-based access control
- Redis Cache - Distributed query caching
- TUI Dashboard - Terminal monitoring interface
📦 Installation
pip install turbo_orm
# With async support
pip install turbo_orm[async]
# With Redis caching
pip install turbo_orm[redis]
# All extras
pip install turbo_orm[async,redis,http]
🎯 Quick Start
from turbo import Database, Model, TextField, IntegerField
# Define models
class Post(Model):
title = TextField(required=True)
content = TextField()
views = IntegerField(default=0)
# Setup database
db = Database("blog.db")
db.connect()
Post.create_table(db)
# Create
post = Post(title="Hello World", content="My first post")
post.save(db)
# Read
post = Post.get(db, 1)
all_posts = Post.all(db)
popular = Post.filter(db, views__gt=100)
# Update
post.views += 1
post.save(db)
# Delete
post.delete(db)
🏆 Why Turbo?
| Feature | Turbo | SQLAlchemy | Peewee |
|---|---|---|---|
| INSERT Speed | 84k ops/sec | 24k ops/sec | 10k ops/sec |
| SELECT Speed | 994k ops/sec | 5k ops/sec | 6k ops/sec |
| Dependencies | 0 | 2+ | 0 |
| Async Support | ✅ | ✅ | ❌ |
| Vector Search | ✅ | ❌ | ❌ |
| CDC | ✅ | ❌ | ❌ |
📚 Documentation
🎨 Real-World Examples
Check out complete demo applications:
🤝 Contributing
Contributions are welcome! Please see CONTRIBUTING.md.
📄 License
MIT License - see LICENSE file for details.
⭐ Show Your Support
If you find Turbo useful, please consider giving it a star on GitHub!
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 turbo_orm-1.0.0.tar.gz.
File metadata
- Download URL: turbo_orm-1.0.0.tar.gz
- Upload date:
- Size: 97.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b15e1d19538e62fbd0f07bdd531c6e7ca32b358f0ec1410361d69ce719b9019
|
|
| MD5 |
131e759288260b4b99fa01d9a2ac28ff
|
|
| BLAKE2b-256 |
dd6606eeb60392d8bea6f15d1eea5a178b20e8b5d52c32b5fc9ab227a965b324
|
File details
Details for the file turbo_orm-1.0.0-py3-none-any.whl.
File metadata
- Download URL: turbo_orm-1.0.0-py3-none-any.whl
- Upload date:
- Size: 95.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a9cfc9a8a59595c86e9568484fe3aa48b156404b1f4f9030f82bf196c94c133
|
|
| MD5 |
c4ad85c27c80329d4a9065e2c4396d79
|
|
| BLAKE2b-256 |
beefad9ece0d8bdae0650f86734cd0a7cd6ba9c2d0a463ba4b209dd31dc7dcd1
|