r/FastAPI • u/mr_Fatalyst • Mar 13 '26
pip package My attempt at building a Pydantic-native async ORM
Hey everyone! One thing that always bugged me with FastAPI: Pydantic does a great job validating data and not letting garbage through. But the moment you bring in an ORM, you're back to separate models with their own rules, and that whole validation contract breaks apart.
I personally don't vibe with SQLAlchemy, just not my style, no hate. And existing alternatives either wrap it (SQLModel) or bring their own model system (Tortoise). I wanted something where the Pydantic model IS the database model. One class, one contract, validation on the way in and on the way out.
So I tried to build what I think an async ORM could look like in 2026. Django-style query API because I think it's one of the best. Explicit, no lazy loading, no magic, you see exactly what hits the database. Type stubs generated automatically so your IDE knows every field and lookup. Rust core for SQL generation and pooling so you don't pay for the convenience in performance.
Every ORM needs at least a basic admin panel, so I built that too. Auto-generates CRUD, search, filters, export from your models. Works with FastAPI, Litestar, Sanic, Quart, Falcon.
Here's everything:
- ORM: github.com/mr-fatalyst/oxyde
- Admin panel: github.com/mr-fatalyst/oxyde-admin
- Step-by-step FastAPI example (blog API from scratch): github.com/mr-fatalyst/fastapi-oxyde-example
- Docs: oxyde.fatalyst.dev
Just pip install oxyde, that's it. The Rust core (oxyde-core) ships as pre-built wheels for Linux, macOS, and Windows, so no Rust toolchain needed.
It's v0.5, beta. Would love to hear your thoughts, ideas, criticism, whatever. If something is missing or feels off, I want to know about it.
15
u/Potential-Box6221 Mar 13 '26
Half way through and I was sure you are from Django background, given what you're wanting!
It's bad to mix up a data model with application/service logic validations/schemas, hence we always want this to be decoupled so they can scale and evolve independently.
I don't want fastAPI to ever go down that line to become an opinionanted mess like Django.
3
u/jericho1050 Mar 15 '26
Seems like i found a project to contribute to. Im gonna look into this
2
u/oganaija Mar 14 '26
SQLAlchemy is fine. Alembic sucks for migrations. Especially if you’re coming from a django background.
2
u/arbiter_rise Mar 16 '26
It seems like you’re creating the framework out of inconvenience, which I think is great. I’ve starred it. I’m not a big fan of SQLAlchemy either.
1
u/Ok_Bedroom_5088 Mar 13 '26
Fight me, but raw SQL is the best. so what?
1
u/NayosKor Mar 13 '26
Looks very good. Any plans for sqlserver?
1
u/instadit Mar 14 '26
when the app and featureset is simple, I guess it's appealing to reuse the endpoint's validation definitions for the data model. Personally I fell into that trap once and won't ever fall again.
I provide an endpoint x and if I want to change the data model, I introduce breaking changes to the endpoint? I can't think of a scenario were that's worth it.
1
u/Tishka-17 Mar 14 '26
please, stop building active record based on global variables!!!