Oxyde ORM is a type-safe, Pydantic-centric asynchronous ORM with a high-performance Rust core designed for clarity, speed, and reliability.
Inspired by the elegance of Django's ORM, Oxyde focuses on explicitness over magic, providing a modern developer-friendly workflow with predictable behavior and strong typing throughout.
Heads up! Oxyde is a young project under active development. The API may evolve between minor versions. Feedback, bug reports, and ideas are very welcome. Feel free to open an issue!
Features
- Django-style API — Familiar
Model.objects.filter()syntax - Pydantic v2 models — Full validation, type hints, serialization
- Async-first — Built for modern async Python with
asyncio - Rust performance — SQL generation and execution in native Rust
- Multi-database — PostgreSQL, SQLite, MySQL support
- Transactions —
transaction.atomic()context manager with savepoints - Migrations — Django-style
makemigrationsandmigrateCLI
Performance
Benchmarks vs popular Python ORMs (avg ops/sec, higher is better):
| Database | Oxyde | Tortoise | Piccolo | Django | SQLAlchemy | SQLModel | Peewee |
|---|---|---|---|---|---|---|---|
| PostgreSQL | 1,475 | 888 | 932 | 736 | 445 | 431 | 80 |
| MySQL | 1,239 | 794 | — | 714 | 536 | 505 | 461 |
| SQLite | 2,525 | 1,882 | 469 | 1,294 | 588 | 567 | 548 |
Full benchmark report: Documentation
Installation
pip install oxyde
Quick Start
1. Initialize Project
oxyde init
This creates oxyde_config.py with your database settings and model paths.
2. Define Models
# models.py
from oxyde import Model, Field
class User(Model):
id: int | None = Field(default=None, db_pk=True)
name: str
email: str = Field(db_unique=True)
age: int | None = Field(default=None)
class Meta:
is_table = True
3. Create Tables
oxyde makemigrations
oxyde migrate
4. Use It
import asyncio
from oxyde import db
from models import User
async def main():
await db.init(default="sqlite:///app.db")
# Create
user = await User.objects.create(name="Alice", email="alice@example.com", age=30)
# Read
users = await User.objects.filter(age__gte=18).all()
user = await User.objects.get(id=1)
# Update
user.age = 31
await user.save()
# Delete
await user.delete()
await db.close()
asyncio.run(main())
Transactions
from oxyde.db import transaction
async with transaction.atomic():
user = await User.objects.create(name="Alice", email="alice@example.com")
await Profile.objects.create(user_id=user.id)
# Auto-commits on success, rolls back on exception
FastAPI Integration
from fastapi import FastAPI
from oxyde import db
app = FastAPI(
lifespan=db.lifespan(
default="postgresql://localhost/mydb",
)
)
@app.get("/users")
async def get_users():
return await User.objects.filter(is_active=True).all()
Database Support
| Database | Min Version | Status | Notes |
|---|---|---|---|
| PostgreSQL | 12+ | Full | RETURNING, UPSERT, FOR UPDATE/SHARE, JSON, Arrays |
| SQLite | 3.35+ | Full | RETURNING, UPSERT, WAL mode by default |
| MySQL | 8.0+ | Full | UPSERT via ON DUPLICATE KEY, FOR UPDATE/SHARE |
Connection URLs:
postgresql://user:password@localhost:5432/database
sqlite:///path/to/database.db
sqlite:///:memory:
mysql://user:password@localhost:3306/database
Ecosystem
Oxyde Admin
Auto-generated admin panel for Oxyde ORM with zero boilerplate.
- Automatic CRUD, search, filters, export
- FastAPI, Litestar, Sanic, Quart, Falcon
- Theming, authentication, bulk operations
pip install oxyde-admin
Documentation
Full documentation: https://oxyde.fatalyst.dev/
- Quick Start — Get up and running
- User Guide — Models, queries, relations, transactions
- Cheatsheet — Quick reference for all methods
Contributing
If you have suggestions or find a bug, please open an issue or create a pull request on GitHub.
License
This project is licensed under the terms of the MIT license.
Metadata
Release files for oxyde 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| oxyde-0.8.0.tar.gz | 120.2 kB | Without provenance | Details for oxyde-0.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| oxyde-0.8.0-py3-none-any.whl | Python 3 | none | any | Details for oxyde-0.8.0-py3-none-any.whl |
Total release size: 264.9 kB
Release files / oxyde-0.8.0.tar.gz
| Download URL | oxyde-0.8.0.tar.gz |
|---|---|
| Size | 120.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8610a524304951633b98c2ce51bb70ebf75f86fd4e341926757746fed4d8b2c
|
|
BLAKE2b-256 checksum How to use checksums |
aa117e9f5f9bb2e2ba278e7e795c2c6407eeadf33d6a2f9b549195a72c44e17e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / oxyde-0.8.0-py3-none-any.whl
| Download URL | oxyde-0.8.0-py3-none-any.whl |
|---|---|
| Size | 144.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5431e777584c6aa8d36adfd9a5a636b2d7864439d79d676f7b74ff3b6aeda509
|
|
BLAKE2b-256 checksum How to use checksums |
c8b51b8376187bdc0c32c7f22c922e30ab21a177e8e19cfe7433876f95d69d09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for oxyde 0.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.