{"data":{"slug":"sqlmodel","name":"SQLModel","tagline":"SQL + Pydantic in one elegant package","category":"python","categoryName":"Python","url":"https://sqlmodel.tiangolo.com","github":"https://github.com/tiangolo/sqlmodel","pricing":"open-source","hook":"SQLModel is one model for both your database and your API.","whatsGood":"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.","theCatch":"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.","addedAt":"2026-08-18","featured":false,"domain":"Python","subSpecialty":"Data","capabilities":["orm","sql","api"],"surfaces":["API","Self-host"],"ecosystem":["Python"],"licenseModel":"OSS/MIT","githubStars":18299},"related":[{"slug":"fastapi","name":"FastAPI","tagline":"Modern Python APIs at startup speed"},{"slug":"pydantic","name":"Pydantic","tagline":"Data validation using Python type hints"},{"slug":"uv","name":"uv","tagline":"Python packaging at Rust speed"},{"slug":"ruff","name":"Ruff","tagline":"Python linter faster than your test suite"},{"slug":"polars","name":"Polars","tagline":"DataFrames that respect your CPU"}],"links":{"self":"/api/gems/sqlmodel","html":"/gems/sqlmodel","markdown":"/gems/sqlmodel.md","category":"/api/gems?category=python","categoryPage":"/stacks/python"}}