Git & GitHubโ—Web Application Basicsโ—APIsโ—Databasesโ—Server Basicsโ—Programming Fundamentalsโ—Python Basicsโ—JavaScript Basicsโ—HTML & CSSโ—The Command Lineโ—How the Internet Worksโ—Computer Science Basicsโ—Linux Basicsโ—Data Structures, Gentlyโ—Debugging & Problem Solvingโ—Markdown & Technical Writingโ—Cloud & Deployment Basicsโ—FastAPIโ—PostgreSQLโ—Redisโ—Celeryโ—MongoDBโ—System Designโ—Low Level Designโ—Microservicesโ—Reactโ—Vue.jsโ—Micro Front-endsโ—Djangoโ—Web Servers (NGINX & Apache)โ—AI for Developersโ—ChatGPT & Claude for Codingโ—Prompt Engineering Basicsโ—Build with the Claude APIโ—Claude Codeโ—Finance for Everyoneโ—Freelancingโ—Digital Marketingโ—SEOโ—GEO โ€” Generative Engine Optimisationโ—Social Media Marketingโ—Performance Marketingโ—PPC Adsโ—Google Adsโ—Google AdSenseโ—Meta Adsโ—Ad Library Researchโ—Biology: Advancedโ—Biology: Beginnerโ—Biology: Intermediateโ—Canva Designing: Beginnerโ—Chemistry: Advancedโ—Chemistry: Beginnerโ—Chemistry: Intermediateโ—Communication Skills: Advancedโ—Communication Skills: Beginnerโ—Communication Skills: Intermediateโ—Digital Entrepreneurship: Advancedโ—Digital Entrepreneurship: Beginnerโ—Digital Entrepreneurship: Intermediateโ—History: Advancedโ—History: Beginnerโ—History: Intermediateโ—Leadership Skills: Advancedโ—Leadership Skills: Beginnerโ—Leadership Skills: Intermediateโ—Mathematics: Advancedโ—Mathematics: Beginnerโ—Mathematics: Intermediateโ—Personal Branding: Advancedโ—Personal Branding: Beginnerโ—Personal Branding: Intermediateโ—Physical Education: Beginnerโ—Physical Education: Intermediateโ—Physics: Advancedโ—Physics: Beginnerโ—Physics: Intermediateโ—Presentation Skills: Beginnerโ—Presentation Skills: Intermediateโ—Project Management: Advancedโ—Project Management: Beginnerโ—Project Management: Intermediateโ—Public Speaking: Advancedโ—Public Speaking: Beginnerโ—Public Speaking: Intermediateโ—Sales and Negotiation: Advancedโ—Sales and Negotiation: Beginnerโ—Sales and Negotiation: Intermediateโ—

Intermediate ยท 5h 58m ยท 22 lessons

FastAPI

Build fast, modern Python APIs with automatic docs, validation and dependency injection.

What you'll learn

  • โœฆBuild a FastAPI app with path operations and run it with Uvicorn or the fastapi command
  • โœฆRead path and query parameters with type hints, defaults and Query or Path rules
  • โœฆWrite Pydantic models that validate request bodies, including nested and list fields
  • โœฆChoose the right status code, raise clean HTTP errors and filter output with a response model
  • โœฆBuild dependencies with Depends() and yield to share database sessions and protect routes
  • โœฆDecide where work belongs: middleware, CORS, background tasks, async def or plain def
  • โœฆConnect a database, protect routes and test the API with TestClient

Part of these career paths

Certification projects

Build 4 projects to earn your certificate

Hands-on work that proves you can apply what you learned โ€” part of the certificate requirements.

View projects โ†’

Syllabus

Module 1 ยท 54m
Getting started Free
What you'll be able to do
  • Can explain where a FastAPI app sits between a client and a database, and what one type hint does
  • Can write a GET path operation that returns JSON, and tell a 404 from a 405
  • Can start the app with fastapi dev or uvicorn and send test requests from /docs
Module 2 ยท 48m
Path & query parameters Locked
What you'll be able to do
  • Can capture typed path parameters and order routes so fixed paths still match
  • Can add required and optional query parameters and predict the values FastAPI passes
  • Can add Query and Path rules (lengths, ranges, patterns) and test their edges
Module 3 ยท 51m
Request bodies with Pydantic Locked
What you'll be able to do
  • Can write a Pydantic model with required and optional fields, and predict what it converts or rejects
  • Can accept a validated JSON body and read a 422 reply to find the broken field
  • Can model nested JSON with models inside models and typed lists
Module 4 ยท 50m
Responses, status codes & errors Locked
What you'll be able to do
  • Can choose the right status code for create, queue, delete and each kind of client error
  • Can raise HTTPException so a failure stops the handler and sends a clear JSON error
  • Can filter output with a response model, so fields like password hashes never leave the server
Module 5 ยท 48m
Dependency injection Locked
What you'll be able to do
  • Can move repeated setup into a dependency and declare it with Depends()
  • Can chain dependencies and clean up after each request with yield
  • Can protect chosen routes with an auth dependency and pick 401 or 403
Module 6 ยท 45m
Lifecycle, middleware & tasks Locked
What you'll be able to do
  • Can put the stages of a request in order and say which stage sent a status code
  • Can add middleware and set CORS so a browser page on another origin can call the API
  • Can move follow-up work into BackgroundTasks and decide when a task queue is needed
Module 7 ยท 1h 2m
Async, databases & production Locked
What you'll be able to do
  • Can choose def or async def and spot a blocking call inside async def
  • Can connect SQLModel with one engine and a session per request, and save rows
  • Can test endpoints with TestClient and dependency overrides
  • Can plan the steps that take a working API to a deployed one

More Backend courses