Developer mr_Fatalyst released Oxyde, a Pydantic-native async ORM with a Rust backend, gaining 239 GitHub stars and significant community attention on Hacker News. The project eliminates model duplication in FastAPI applications by making Pydantic models directly serve as database models, while achieving 66-329% performance improvements over established ORMs through its Rust-powered architecture.
Eliminating Model Duplication in FastAPI Applications
Oxyde addresses a common pain point for FastAPI developers: defining separate Pydantic models for APIs and ORM models for databases, then writing converters between them. While SQLModel attempts to solve this by combining both, it remains SQLAlchemy underneath. Oxyde takes a different approach—the Pydantic model becomes the database model directly, with full validation on input and output, native type hints, and zero duplication.
The ORM follows an "explicit over implicit" philosophy. Queries do not touch the database until developers call terminal methods like .all(), .get(), or .first(). Related data requires explicit .join() or .prefetch() calls, eliminating lazy loading and surprise N+1 queries. Developers can see exactly what hits the database by reading the code.
Three-Layer Type Safety System With Auto-Generated Stubs
Oxyde implements a three-level type safety approach. First, when running makemigrations, the system auto-generates .pyi stub files so IDEs understand that filter(age__gte=...) takes an integer, create() accepts exactly the model's fields, and .all() returns list[User] not list[Any]. Second, Pydantic validates data entering the database. Third, Pydantic validates data exiting via model_validate(). This architecture delivers autocompletion, immediate error detection, and runtime guarantees from a single model definition.
Rust Backend Delivers 66-329% Performance Advantage
Benchmarks show Oxyde consistently outperforms Tortoise, Django, and SQLAlchemy across PostgreSQL, SQLite, and MySQL. On PostgreSQL, Oxyde achieves 1,475 operations per second compared to Tortoise's 888 (66% faster) and SQLAlchemy's 445 (231% faster). On SQLite, Oxyde reaches 2,525 ops/sec versus SQLAlchemy's 588 (329% faster). MySQL performance shows 1,239 ops/sec against Tortoise's 794 (56% faster).
The developer chose Rust not for speed as a primary goal, but because "infrastructure stuff like SQL generation, connection pooling, and row serialization is where a systems language makes sense." Python handles models and business logic while Rust manages database plumbing. Queries build as an intermediate representation in Python, serialize via MessagePack, get sent to Rust which generates dialect-specific SQL, executes it, and streams results back.
Beta Release Includes Django-Style Migrations and Admin Panel
Version 0.5 ships with Django-style migrations (makemigrations/migrate), transactions with savepoints, joins and prefetch capabilities, and support for PostgreSQL, SQLite, and MySQL. The MIT-licensed codebase splits 67.9% Python and 32.1% Rust. An auto-generated admin panel works with FastAPI, Litestar, Sanic, Quart, and Falcon. While in beta with potential API changes, Oxyde already demonstrates production-ready features for developers seeking type-safe, high-performance database interactions without model duplication.
Key Takeaways
- Oxyde eliminates model duplication by making Pydantic models directly serve as database models with full validation and type safety
- Achieves 66% faster performance than Tortoise on PostgreSQL and 329% faster than SQLAlchemy on SQLite through Rust-powered backend
- Auto-generates .pyi stub files during migrations providing IDE autocompletion and type checking for all database operations
- Follows explicit-over-implicit philosophy with no lazy loading or surprise N+1 queries—developers see exactly what hits the database
- Currently at v0.5 beta with 239 GitHub stars, supporting PostgreSQL, SQLite, MySQL with Django-style migrations and auto-generated admin panels