SQLModel
SQL ORM combining SQLAlchemy with Pydantic for Python databases.
Databases, ORMs and clients PyPI MIT
How SQLModel is used
SQLModel is a dependency in 13 of the 6,208 public GitHub projects set up for AI coding agents that we scanned, too few to describe it from them alone. Our scan also samples projects by dependency (Solana 2,661, Ethereum and EVM 1,496, 3D and games 2,818, agent frameworks and SDKs 10,983); counting those, it appears in 97 projects, and what it is used with below comes from all of them. The most used alternative in our scan is SQLAlchemy (179 projects). Projects that use it most often also use FastAPI (91.8%), python-dotenv (88.7%), Pydantic (87.6%).
SQLModel popularity over time
Gid Score 64: downloads 80, use in agent projects 50, GitHub stars 60, downloads trend 54 (each 0-100). How it is calculated.
Often used with SQLModel
| FastAPI | 91.8% of SQLModel projects · 12.2× more than average |
|---|---|
| python-dotenv | 88.7% of SQLModel projects · 9.7× more than average |
| Pydantic | 87.6% of SQLModel projects · 10.1× more than average |
| Uvicorn | 83.5% of SQLModel projects · 10.9× more than average |
| python-multipart | 81.4% of SQLModel projects · 27.2× more than average |
| SQLAlchemy | 80.4% of SQLModel projects · 27.9× more than average |
| PyYAML | 74.2% of SQLModel projects · 12.5× more than average |
| NumPy | 72.2% of SQLModel projects · 12.4× more than average |
From all 97 projects in our scan that use SQLModel, including the dependency samples.
By coding agent
| GitHub Copilot | 0.3% of projects set up for it |
|---|---|
| Claude Code | 0.2% of projects set up for it |
| Cursor | 0.2% of projects set up for it |
Share of public repos configured for each agent that list SQLModel as a dependency.
How SQLModel is funded
GitHub Sponsors
| @tiangolo | 115 current sponsors |
|---|
GitHub shows how many people and companies sponsor an account, not how much they pay. Sponsors of a person back all of their work, which here includes FastAPI, Typer, Asyncer.
Ways to fund SQLModel
As the maintainers list them in FUNDING.yml on GitHub. Checked Oct 20, 2026.
Install
| Package | pip install sqlmodel |
|---|---|
| Main stacks | Python (97) |
| Example projects | KodyKendall/LlamaBot, aihes/LangChain-Tutorials-and-Examples, Hoanganhvu123/ShoppingGPT, guaidao2/XuanMu-RedTeam-Agent, NihadMemmedli/quorvex_ai |
Alternatives to SQLModel
Tools that do the same job, so a project picks one or the other. Add-ons and libraries used alongside SQLModel are not listed here; they are in "Often used with".
| Tool | Gid Score | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|---|
| SQLAlchemy pypi Python SQL toolkit and object-relational mapper for database abstraction. |
79 | 179 (11.0%) | 87.6M | 12.2K | MIT |
| PyMySQL pypi Pure Python MySQL database driver for database operations. |
64 | 21 (1.3%) | 18.2M | 7,855 | MIT |
| PyMongo pypi Official MongoDB Python driver for querying and managing MongoDB databases. |
67 | 12 (0.7%) | 16.2M | — | Apache-2.0 |
More in Databases, ORMs and clients: pg Drizzle ORM Prisma Drizzle Kit better-sqlite3 psycopg2 Alembic Neon Serverless Driver