Course

FastAPI: Build Production APIs in Python

Learn FastAPI from your first endpoint to a deployed, tested API — path and query params, Pydantic validation, databases, auth, and deployment, all hands-on.

At a glance

Level
Beginner to Intermediate
Lessons
40 lessons across 8 modules
What you build
A complete, deployable Task Manager API
Cost
Free forever · no sign-up

Course syllabus

Work through the modules at your own pace. Each lesson is a self-contained, hands-on read.

1 Getting Started with FastAPI 5 lessons · 1 week
2 Request Bodies and Pydantic 5 lessons · 1 week
3 HTTP Done Right: Status, Errors, Forms & Files 5 lessons · 1 week
4 Structure, Dependencies, and Middleware 5 lessons · 1 week
5 Databases with SQLModel 5 lessons · 1 week
6 Authentication and Security 5 lessons · 1 week
7 Async, Background Work, and Streaming 5 lessons · 1 week
8 Testing, Settings, Deployment, and Capstone 5 lessons · 1–2 weeks

Before you start

You only need basic Python — variables, functions, and dictionaries. No prior web, HTTP, or API experience is required; every term is explained the first time it appears. If you'd like the Python foundation first, our Python for Data Analytics course has you covered. By the end you'll build and deploy a complete REST API, and you'll be ready for the Shipping AI Applications module of the Generative AI course.

Set up your environment

You can complete this course on any machine with Python 3.10+. One install gets you started; later modules add a few small packages where the course introduces them.

pip install "fastapi[standard]==0.138.1"

The [standard] extra bundles uvicorn (the server you'll run your app with) and everything you need for the early modules. The database, auth, and testing modules add sqlmodel, pyjwt, passlib[bcrypt], and pytest when you reach them — each lesson tells you exactly what to install. Everything runs locally; there's nothing to deploy and no account to create to follow along.

Tested with (June 2026)

  • python 3.12
  • fastapi 0.138.1
  • uvicorn 0.49.0
  • pydantic 2.x
  • httpx 0.28.1
  • sqlmodel (databases module)

FastAPI is stable, but tooling moves. If a package has changed since these versions, the patterns still apply — adjust the syntax to what you have installed.

Course features

Completely Free

No sign-up, no subscriptions

Beginner Friendly

From your first endpoint, one idea at a time

Real, Runnable Code

Every example tested and ready to copy

One Project, Start to Finish

A Task Manager API that grows with you

Validation to Deployment

Pydantic, databases, auth, tests, Docker

Text-Based

Easy to copy, search, and reference

Ready to build your first API?

Start with Getting Started with FastAPI and build up to a complete, tested, deployable Task Manager API.

Start the first lesson