Show HN: Oxyde – Pydantic-native async ORM with a Rust core
📰 Hacker News · mr_Fatalyst
Learn about Oxyde, a Pydantic-native async ORM with a Rust core that simplifies model definition and database interaction for FastAPI applications
Action Steps
- Define Pydantic models for your API using Oxyde
- Use Oxyde's query API to interact with your database, leveraging Django-style methods like .objects.filter() and .exclude()
- Explicitly call terminal methods like .all(), .get(), or .first() to execute queries
- Optimize related data loading by using .join() or .prefetch() methods
- Validate input and output data using Pydantic's native type hints and validation
Who Needs to Know This
Backend developers and data engineers working with FastAPI can benefit from Oxyde's streamlined model definition and validation, reducing duplication and improving code maintainability
Key Insight
💡 Oxyde eliminates model duplication by using Pydantic models as database models, providing full validation and native type hints
Share This
🚀 Introducing Oxyde, a Pydantic-native async ORM with a Rust core! Simplify your FastAPI model definition and database interaction 🚀
Key Takeaways
Learn about Oxyde, a Pydantic-native async ORM with a Rust core that simplifies model definition and database interaction for FastAPI applications
Full Article
Hi HN! I built Oxyde because I was tired of duplicating my models. If you use FastAPI, you know the drill. You define Pydantic models for your API, then define separate ORM models for your database, then write converters between them. SQLModel tries to fix this but it's still SQLAlchemy underneath. Tortoise gives you a nice Django-style API but its own model system. Django ORM is great but welded to the framework. I wanted something simple: your Pydantic model IS your database model. One class, full validation on input and output, native type hints, zero duplication. The query API is Django-style (.objects.filter(), .exclude(), Q/F expressions) because I think it's one of the best designs out there. Explicit over implicit. I tried to remove all the magic. Queries don't touch the database until you call a terminal method like .all(), .get(), or .first(). If you don't explicitly call .join() or .prefetch(), related data won't be loaded. No lazy loading, no s
DeepCamp AI