| name | sqlmodel |
| description | Python ORM package for working with SQL databases. Use when creating database models, performing CRUD operations, or building database-backed APIs. |
| tagline | SQLModel ORM for Python database models |
| last-updated | "2026-05-09T00:00:00.000Z" |
| autoload | {"tools":["read","write","edit"],"paths":["**/models/**/*.py","**/db/**/*.py","**/database/**/*.py","**/models.py","**/db.py","**/database.py"]} |
SQLModel
Create a Table with SQLModel - Use the Engine
https://sqlmodel.tiangolo.com/tutorial/create-db-and-table
Create Rows - Use the Session - INSERT
https://sqlmodel.tiangolo.com/tutorial/insert
Automatic IDs, None Defaults, and Refreshing Data
https://sqlmodel.tiangolo.com/tutorial/automatic-id-none-refresh
Read Data - SELECT
https://sqlmodel.tiangolo.com/tutorial/select
Filter Data - WHERE
https://sqlmodel.tiangolo.com/tutorial/where
Indexes - Optimize Queries
https://sqlmodel.tiangolo.com/tutorial/indexes
Read One Row
https://sqlmodel.tiangolo.com/tutorial/one
Read a Range of Data - LIMIT and OFFSET
https://sqlmodel.tiangolo.com/tutorial/limit-and-offset
Update Data - UPDATE
https://sqlmodel.tiangolo.com/tutorial/update
Delete Data - DELETE
https://sqlmodel.tiangolo.com/tutorial/delete
Connect Tables - JOIN - Intro
https://sqlmodel.tiangolo.com/tutorial/connect
Create Connected Tables
https://sqlmodel.tiangolo.com/tutorial/connect/create-connected-tables
Create and Connect Rows
https://sqlmodel.tiangolo.com/tutorial/connect/create-connected-rows
Read Connected Data
https://sqlmodel.tiangolo.com/tutorial/connect/read-connected-data
Update Data Connections
https://sqlmodel.tiangolo.com/tutorial/connect/update-data-connections
Remove Data Connections
https://sqlmodel.tiangolo.com/tutorial/connect/remove-data-connections
Relationship Attributes - Intro
https://sqlmodel.tiangolo.com/tutorial/relationship-attributes
Define Relationships Attributes
https://sqlmodel.tiangolo.com/tutorial/relationship-attributes/define-relationships-attributes
Create and Update Relationships
https://sqlmodel.tiangolo.com/tutorial/relationship-attributes/create-and-update-relationships
Read Relationships
https://sqlmodel.tiangolo.com/tutorial/relationship-attributes/read-relationships
Remove Relationships
https://sqlmodel.tiangolo.com/tutorial/relationship-attributes/remove-relationships
Relationship back_populates
https://sqlmodel.tiangolo.com/tutorial/relationship-attributes/back-populates
Cascade Delete Relationships
https://sqlmodel.tiangolo.com/tutorial/relationship-attributes/cascade-delete-relationships
Type annotation strings
https://sqlmodel.tiangolo.com/tutorial/relationship-attributes/type-annotation-strings
Many to Many - Intro
https://sqlmodel.tiangolo.com/tutorial/many-to-many
Create Models with a Many-to-Many Link
https://sqlmodel.tiangolo.com/tutorial/many-to-many/create-models-with-link
Create Data with Many-to-Many Relationships
https://sqlmodel.tiangolo.com/tutorial/many-to-many/create-data
Update and Remove Many-to-Many Relationships
https://sqlmodel.tiangolo.com/tutorial/many-to-many/update-remove-relationships
Link Model with Extra Fields
https://sqlmodel.tiangolo.com/tutorial/many-to-many/link-with-extra-fields
Code Structure and Multiple Files
https://sqlmodel.tiangolo.com/tutorial/code-structure
FastAPI and Pydantic - Intro
https://sqlmodel.tiangolo.com/tutorial/fastapi
Simple Hero API with FastAPI
https://sqlmodel.tiangolo.com/tutorial/fastapi/simple-hero-api
FastAPI Response Model with SQLModel
https://sqlmodel.tiangolo.com/tutorial/fastapi/response-model
Multiple Models with FastAPI
https://sqlmodel.tiangolo.com/tutorial/fastapi/multiple-models
Read One Model with FastAPI
https://sqlmodel.tiangolo.com/tutorial/fastapi/read-one
Read Heroes with Limit and Offset with FastAPI
https://sqlmodel.tiangolo.com/tutorial/fastapi/limit-and-offset
Update Data with FastAPI
https://sqlmodel.tiangolo.com/tutorial/fastapi/update
Update with Extra Data (Hashed Passwords) with FastAPI
https://sqlmodel.tiangolo.com/tutorial/fastapi/update-extra-data
Delete Data with FastAPI
https://sqlmodel.tiangolo.com/tutorial/fastapi/delete
Session with FastAPI Dependency
https://sqlmodel.tiangolo.com/tutorial/fastapi/session-with-dependency
FastAPI Path Operations for Teams - Other Models
https://sqlmodel.tiangolo.com/tutorial/fastapi/teams
Models with Relationships in FastAPI
https://sqlmodel.tiangolo.com/tutorial/fastapi/relationships
Test Applications with FastAPI and SQLModel
https://sqlmodel.tiangolo.com/tutorial/fastapi/tests