SQLModel
SQL + Pydantic in one elegant package
Python / Data · OSS/MIT · 18.3k
What's Good
The inheritance from both SQLAlchemy and Pydantic means models work everywhere. Async support integrates cleanly with FastAPI. The relationship handling is intuitive for common patterns.
The Catch
Relatively young library, so edge cases exist. Complex SQLAlchemy patterns may need direct SQLAlchemy access.
Verdict
One model for database and API—elegant when it fits.
Embed
[](https://stackgems.com/gems/sqlmodel)