mr-fatalyst/oxyde

Oxyde ORM is a type-safe, Pydantic-centric asynchronous ORM with a high-performance Rust core designed for clarity, speed, and reliability.

Python

766

225 commits

updated Sep 29, 2026

See the code

README

Logo

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.

PyPI Downloads


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 makemigrations and migrate CLI

Performance

Benchmarks vs popular Python ORMs (avg ops/sec, higher is better):

DatabaseOxydeTortoisePiccoloDjangoSQLAlchemySQLModelPeewee
PostgreSQL1,47588893273644543180
MySQL1,239794—714536505461
SQLite2,5251,8824691,294588567548

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="[email protected]", 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="[email protected]")
    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

DatabaseMin VersionStatusNotes
PostgreSQL12+FullRETURNING, UPSERT, FOR UPDATE/SHARE, JSON, Arrays
SQLite3.35+FullRETURNING, UPSERT, WAL mode by default
MySQL8.0+FullUPSERT 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

GitHub →

Documentation

Full documentation: https://oxyde.fatalyst.dev/

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.

async
asyncio
database
fastapi
mysql
orm
postgresql
pydantic
sqlite
sqlx

mr-fatalyst/oxyde

Oxyde ORM is a type-safe, Pydantic-centric asynchronous ORM with a high-performance Rust core designed for clarity, speed, and reliability.

Python

766

225 commits

updated Sep 29, 2026

See the code

README

Logo

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.

PyPI Downloads


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 makemigrations and migrate CLI

Performance

Benchmarks vs popular Python ORMs (avg ops/sec, higher is better):

DatabaseOxydeTortoisePiccoloDjangoSQLAlchemySQLModelPeewee
PostgreSQL1,47588893273644543180
MySQL1,239794—714536505461
SQLite2,5251,8824691,294588567548

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="[email protected]", 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="[email protected]")
    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

DatabaseMin VersionStatusNotes
PostgreSQL12+FullRETURNING, UPSERT, FOR UPDATE/SHARE, JSON, Arrays
SQLite3.35+FullRETURNING, UPSERT, WAL mode by default
MySQL8.0+FullUPSERT 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

GitHub →

Documentation

Full documentation: https://oxyde.fatalyst.dev/

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.

async
asyncio
database
fastapi
mysql
orm
postgresql
pydantic
sqlite
sqlx

Project health

PyPI

Latest release

0.8.0 · Aug 26, 2026

Releases this year

14

Significant stargazers

(top 24 of 34)

Miguel Grinberg

12,952 followers · starred Mar 2026

D. Bohdan

274 followers · starred Mar 2026

Jan Katins

122 followers · starred Feb 2026

Daniel Roy Greenfeld

4,433 followers · starred Mar 2026