Mathew K Analytics

Learn FastAPI with free notebooks

18 free video lessons that use FastAPI, each with a downloadable Jupyter notebook and, where needed, the dataset. Learn FastAPI by working through real examples.

About these FastAPI lessons

These 18 lessons come from 1 different course. The course with the most FastAPI lessons is FastAPI deep dive (18 lessons).

FastAPI is most often used here together with Pydantic, datetime, SQLAlchemy and asyncio.

Watch the video, then run the notebook yourself: changing the code and re-running it is the fastest way to learn.

Courses that use FastAPI

FastAPI Tutorial #1: Getting Started — Build Your First Python API13 min
Lesson 1

FastAPI Tutorial #1: Getting Started — Build Your First Python API

📓 Notebook · FastAPI

FastAPI Tutorial #2: Path & Query Parameters Explained14 min
Lesson 2

FastAPI Tutorial #2: Path & Query Parameters Explained

📓 Notebook · FastAPI

FastAPI Tutorial #3: Request Bodies & Pydantic Models15 min
Lesson 3

FastAPI Tutorial #3: Request Bodies & Pydantic Models

📓 Notebook · FastAPI · Pydantic

FastAPI Tutorial #4: Response Models & HTTP Status Codes16 min
Lesson 4

FastAPI Tutorial #4: Response Models & HTTP Status Codes

📓 Notebook · FastAPI · Pydantic

FastAPI Tutorial #5: Data Validation with Pydantic17 min
Lesson 5

FastAPI Tutorial #5: Data Validation with Pydantic

📓 Notebook · FastAPI · Pydantic

FastAPI Tutorial #6: Path Operation Configuration & Better Docs17 min
Lesson 6

FastAPI Tutorial #6: Path Operation Configuration & Better Docs

📓 Notebook · FastAPI

FastAPI Tutorial #7: Dependency Injection with Depends()17 min
Lesson 7

FastAPI Tutorial #7: Dependency Injection with Depends()

📓 Notebook · FastAPI

FastAPI Tutorial #8: Class-Based & Sub-Dependencies17 min
Lesson 8

FastAPI Tutorial #8: Class-Based & Sub-Dependencies

📓 Notebook · FastAPI

FastAPI Tutorial #9: Organising Routes with APIRouter16 min
Lesson 9

FastAPI Tutorial #9: Organising Routes with APIRouter

📓 Notebook · FastAPI

FastAPI Tutorial #10: Middleware & CORS Setup17 min
Lesson 10

FastAPI Tutorial #10: Middleware & CORS Setup

📓 Notebook · FastAPI

FastAPI Tutorial #11: Error Handling & Custom Exceptions18 min
Lesson 11

FastAPI Tutorial #11: Error Handling & Custom Exceptions

📓 Notebook · FastAPI · Pydantic

FastAPI Tutorial #12: Authentication Basics with OAuth216 min
Lesson 12

FastAPI Tutorial #12: Authentication Basics with OAuth2

📓 Notebook · FastAPI

FastAPI Tutorial #13: JWT Authentication End to End16 min
Lesson 13

FastAPI Tutorial #13: JWT Authentication End to End

📓 Notebook · FastAPI · datetime

FastAPI Tutorial #14: Databases with SQLAlchemy
Lesson 14

FastAPI Tutorial #14: Databases with SQLAlchemy

📓 Notebook · SQLAlchemy · FastAPI · Pydantic

FastAPI Tutorial #15: Async & Background Tasks
Lesson 15

FastAPI Tutorial #15: Async & Background Tasks

📓 Notebook · FastAPI · asyncio

FastAPI Tutorial #16: Real-Time WebSockets
Lesson 16

FastAPI Tutorial #16: Real-Time WebSockets

📓 Notebook · FastAPI

FastAPI Tutorial #17: Testing FastAPI Apps with pytest
Lesson 17

FastAPI Tutorial #17: Testing FastAPI Apps with pytest

📓 Notebook · FastAPI · pytest · Pydantic

FastAPI Tutorial #18: Capstone — Production-Ready API
Lesson 18

FastAPI Tutorial #18: Capstone — Production-Ready API

📓 Notebook · FastAPI · SQLAlchemy · Pydantic

Frequently asked questions

Where should I start learning FastAPI?

Start with “FastAPI Tutorial #1: Getting Started — Build Your First Python API”, then work through the FastAPI deep dive course.

Are these FastAPI lessons free?

Yes. Every video, notebook and dataset on this site is free to use for learning.

Can I run the FastAPI notebooks without installing Python?

Yes. Open them in Google Colab, or use the Run in browser button where a lesson has one.