#8080th of 354 in Backends, databases and hosting

sqlmodel

Python library that defines SQL tables and Pydantic models in one class

Run it:RackNerd ↗ (opens in a new tab)RepoCloud ↗ (opens in a new tab)Affiliate links, no effect on a rank.

Releases and problems feed (RSS)

Stars
18.7k
License
MIT
Last commit
Nov 2026
Last release
Nov 2026
Language
Python
Stars, last 29 weeks+889
6 May 2026: 17,782 stars13 May 2026: 17,810 stars20 May 2026: 17,842 stars27 May 2026: 17,865 stars3 Jun 2026: 17,891 stars10 Jun 2026: 17,967 stars17 Jun 2026: 18,008 stars24 Jun 2026: 18,045 stars1 Jul 2026: 18,066 stars8 Jul 2026: 18,087 stars15 Jul 2026: 18,114 stars22 Jul 2026: 18,139 stars29 Jul 2026: 18,161 stars5 Aug 2026: 18,177 stars12 Aug 2026: 18,193 stars19 Aug 2026: 18,206 stars26 Aug 2026: 18,223 stars2 Sept 2026: 18,241 stars9 Sept 2026: 18,262 stars16 Sept 2026: 18,282 stars23 Sept 2026: 18,297 stars30 Sept 2026: 18,313 stars7 Oct 2026: 18,326 stars14 Oct 2026: 18,363 stars21 Oct 2026: 18,412 stars28 Oct 2026: 18,473 stars4 Nov 2026: 18,524 stars11 Nov 2026: 18,586 stars18 Nov 2026: 18,630 stars25 Nov 2026: 18,671 stars

17,782 on 6 May 202618,671 on 25 Nov 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

SQLModel is a Python library that defines SQL tables and Pydantic data models with one class, built as a thin layer over SQLAlchemy and Pydantic. Models use type annotations and work with sessions, engines and select() queries, including in FastAPI apps. It is not an AI project; it fits here as the database layer for FastAPI-based starters.

Who it is for: Python and FastAPI developers who want one model for DB tables and validation

Strengths

  • One class serves as both SQLAlchemy table and Pydantic model, avoiding duplicate definitions
  • Full SQLAlchemy underneath, so existing SQLAlchemy models and migrations can be combined with it
  • Type-annotated queries give editor autocompletion and inline errors, even on selected rows
  • Same author as FastAPI; designed to fit its request and response models

Weaknesses

  • Thin wrapper, so advanced use still needs SQLAlchemy knowledge
  • Not a backend or server; no auth, storage or API layer included
  • Not AI-specific; no model, vector or LLM features in the README
  • Migrations tooling is not described in the README

What it needs

  • no GPU
  • Compose
  • Needs Pydantic, SQLAlchemy

What changed

  1. “💥 Drop support for Python 3.10. PR #2139 by @tiangolo.”

From the release notes. No flag means the note does not say so, not that the upgrade is safe.

Known problems

Reported, then fixed by a linked change

Titles are the reporters' own words, taken from the project's GitHub issues and ranked by reactions. We have not tried to reproduce any of them.

Also in Backends, databases and hosting

See all 354
Also in Backends, databases and hosting
RankProjectScore
#78actix-webRust web framework for HTTP/1.x and HTTP/2 servers on Tokio25k starsApache-2.081 out of 100
#79doltMySQL-compatible SQL database with Git-style branch, merge, push and pull25k starsApache-2.081 out of 100
#81questdbTime-series SQL database for high-rate ingestion and queries over live and historical data Live demo ↗ (opens in a new tab)17.6k stars+93 (+0.5%) in 30 daysApache-2.081 out of 100
#82dorisMPP analytics database for real-time SQL, lakehouse queries and hybrid search16.3k stars+130 (+0.8%) in 30 daysApache-2.081 out of 100
#83citusPostgreSQL extension that shards tables across nodes for distributed queries12.9k starsAGPL-3.081 out of 100