Python and FastAPI
Module 24 · Databases with FastAPI and SQLAlchemy
ORM concepts, SQLAlchemy 2.0 models and sessions, CRUD, relationships, migrations with Alembic, async databases, transactions, pooling and repository patterns.
9 lessons
Follow in order
Use the button below to sign in and unlock lessons.
Your path
Lessons in sequence
Work through these in order—each lesson builds on the previous one.
-
Lesson 1 of 9
24.1 ORM concepts and SQLAlchemy Core
-
Lesson 2 of 9
24.2 SQLAlchemy models, sessions and the unit of work
-
Lesson 3 of 9
24.3 A database dependency and CRUD endpoints
-
Lesson 4 of 9
24.4 Relationships: one-to-many and many-to-many
-
Lesson 5 of 9
24.5 Pagination, filtering and sorting
-
Lesson 6 of 9
24.6 Database migrations with Alembic
-
Lesson 7 of 9
24.7 Async SQLAlchemy and aiosqlite
-
Lesson 8 of 9
24.8 Transactions, the N+1 problem and query performance
-
Lesson 9 of 9
24.9 PostgreSQL, connection pooling and the repository pattern