Skip to main content

Ultra-fast Python ORM - 15.2x faster than SQLAlchemy with advanced features

Project description

Turbo ORM

PyPI version Python 3.7+ License: MIT

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


Download files

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

Source Distribution

turbo_orm-1.0.0.tar.gz (97.7 kB view details)

Uploaded Source

Built Distribution

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

turbo_orm-1.0.0-py3-none-any.whl (95.0 kB view details)

Uploaded Python 3

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

Hashes for turbo_orm-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5b15e1d19538e62fbd0f07bdd531c6e7ca32b358f0ec1410361d69ce719b9019
MD5 131e759288260b4b99fa01d9a2ac28ff
BLAKE2b-256 dd6606eeb60392d8bea6f15d1eea5a178b20e8b5d52c32b5fc9ab227a965b324

See more details on using hashes here.

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

Hashes for turbo_orm-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a9cfc9a8a59595c86e9568484fe3aa48b156404b1f4f9030f82bf196c94c133
MD5 c4ad85c27c80329d4a9065e2c4396d79
BLAKE2b-256 beefad9ece0d8bdae0650f86734cd0a7cd6ba9c2d0a463ba4b209dd31dc7dcd1

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