fastapi/sqlmodel
SQL databases in Python, designed for simplicity, compatibility, and robustness. observed · 2026-08-28
Health v2 · maintenance only
96/100
- Activity 99
- Release rhythm 90
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 5.5
- age_days: 1835
- days_rel: 69
- days_push: 8
- n_releases_24m: 17
Adoption not part of the score
18285 stars · 884 forks observed · 2026-08-28
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-08-28 · 32be25c99dc2
- homepage: https://sqlmodel.tiangolo.com/ · fetched 2026-08-29 · 1aeb73290ed1
- site_page: https://sqlmodel.tiangolo.com/features · fetched 2026-08-29 · 4954a5e0fe57
- site_page: https://sqlmodel.tiangolo.com/about · fetched 2026-08-29 · 8542eea61759
- site_page: https://sqlmodel.tiangolo.com/install · fetched 2026-08-29 · 91654be8bb05
- registry_pypi: https://pypi.org/pypi/sqlmodel/json · fetched 2026-08-29 · 4ac611d7bb5f
- site_page: https://sqlmodel.tiangolo.com/databases · fetched 2026-08-29 · af71b5e4868a
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| fastapi/sqlmodel | main | 96 |
For agents
markdown · JSON · MCP: product_card(name="fastapi/sqlmodel")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem