fastapi/sqlmodel
SQL databases in Python, designed for simplicity, compatibility, and robustness. observed · 2026-10-14
Health v2 · maintenance only
98/100
- Activity 98
- Release rhythm 98
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 3
- age_days: 1883
- days_rel: 14
- days_push: 14
- n_releases_24m: 26
Adoption not part of the score
18386 stars · 892 forks observed · 2026-10-14
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
SQLModel is a Python library for interacting with SQL databases using Python objects, built as a thin layer on top of SQLAlchemy and Pydantic. It lets a single type-annotated model serve as both the database schema and the validation/serialization model, minimizing code duplication.
Use cases
- define database models with python type hints
- use one model for both orm and api validation
- interact with sql databases in a fastapi app
- avoid duplicating sqlalchemy and pydantic models
- query and persist rows using python objects
- build crud apis backed by a relational database
When to choose
- you're building a FastAPI application that needs a SQL database
- you want Pydantic validation and SQLAlchemy ORM in a single model
- you value editor autocompletion and minimal boilerplate
- you want a simple, modern-Python ORM with sensible defaults
When to avoid
- you need advanced SQLAlchemy features not exposed by the thin layer
- you're working outside Python or with NoSQL databases
- you already have separate mature SQLAlchemy and Pydantic model layers
- you need a fully mature 1.0-guaranteed API (it's still 0.x)
Facets
library · maturity stable
orm database serialization api-framework databases web-development backend developer-tools python cross-platform sqlalchemy pydantic fastapi sql type-annotations data-modeling
7 sources
- readme: https://github.com/fastapi/sqlmodel · fetched 2026-10-14 · 32be25c99dc2
- homepage: https://sqlmodel.tiangolo.com/ · fetched 2026-10-12 · a4c9ec470879
- site_page: https://sqlmodel.tiangolo.com/features · fetched 2026-10-12 · 4954a5e0fe57
- site_page: https://sqlmodel.tiangolo.com/about · fetched 2026-10-12 · 8542eea61759
- site_page: https://sqlmodel.tiangolo.com/install · fetched 2026-10-12 · 91654be8bb05
- registry_pypi: https://pypi.org/pypi/sqlmodel/json · fetched 2026-10-12 · 42c3e542a4d8
- site_page: https://sqlmodel.tiangolo.com/databases · fetched 2026-10-12 · af71b5e4868a
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| fastapi/sqlmodel | main | 98 |
For agents
markdown · JSON · MCP: product_card(name="fastapi/sqlmodel")
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem