Skip to content
Coming soon

FastAPI

Build fast, reliable, well-documented web APIs with modern Python: type hints and async.

  • 13 modules
  • 21 lessons
  • Shallows to Landfall
  • Free to learn

This course is being written. Its lessons will be free here, like every lesson on Mawj. The outline below is what it will teach; follow the Telegram channel to hear the day it opens.

What you'll be able to do

  • Build REST APIs with FastAPI and Pydantic that are ready for real users
  • Design database schemas and manage migrations with SQLModel
  • Implement secure user authentication with OAuth2 and JWT tokens
  • Deploy containerized FastAPI applications to cloud environments

The full syllabus

13 modules, from the Shallows down. Open any module to see its lessons.

The Shallows

Modules 1–3, 7 lessons

First steps with FastAPI, routes, parameters, and responses.

  1. , coming soon
    1Your first FastAPI appPath operations, running with fastapi dev, and interactive documentation.
    1. 1.1Setting up FastAPISoon
    2. 1.2Your first endpointSoon
    3. 1.3Interactive documentationSoon
  2. , coming soon
    2Parameters and Pydantic modelsPath, query, and request body validation using Pydantic.
    1. 2.1Path and query parametersSoon
    2. 2.2Request bodies with PydanticSoon
  3. , coming soon
    3Responses and error handlingStatus codes, response models, and HTTPException.
    1. 3.1Response models and filteringSoon
    2. 3.2Raising HTTP exceptionsSoon

Currents

Modules 4–7, 7 lessons

Dependencies, databases, modular routers, and authentication.

  1. , coming soon
    4Dependency injectionShare logic, security, and database sessions with Depends.
    1. 4.1Understanding DependsSoon
    2. 4.2Dependencies with yieldSoon
  2. , coming soon
    5Databases with SQLModelRelational databases, sessions, and schema migrations.
    1. 5.1Defining database modelsSoon
    2. 5.2CRUD database operationsSoon
  3. , coming soon
    6Project structure with routersOrganize large applications using APIRouter.
    1. 6.1Splitting routes with APIRouterSoon
  4. , coming soon
    7Authentication and securityPassword hashing, OAuth2, and JWT tokens.
    1. 7.1Password hashingSoon
    2. 7.2JWT authenticationSoon

Deep Water

Modules 8–11, 5 lessons

Async databases, automated testing, middleware, and performance.

  1. , coming soon
    8Async and background tasksAsync database drivers and background worker tasks.
    1. 8.1Async database sessionsSoon
    2. 8.2Background tasksSoon
  2. , coming soon
    9Testing with TestClientAutomated API integration tests with pytest.
    1. 9.1Writing API testsSoon
  3. , coming soon
    10Middleware and lifespan eventsCORS configuration, custom middleware, and startup/shutdown events.
    1. 10.1CORS and custom middlewareSoon
  4. , coming soon
    11Performance and cachingOptimize throughput and reduce database load with caching.
    1. 11.1Caching API responsesSoon

Landfall

Modules 12–13, 2 lessons

Containerization, cloud deployment, and the Capstone project.

  1. , coming soon
    12Deploying FastAPIDocker containers, environment configurations, and production servers.
    1. 12.1Dockerizing FastAPISoon
  2. , coming soon
    13Capstone: The Birr Ledger APITurn the Birr Ledger expense tracker into a full production API.
    1. 13.1Building the Birr Ledger API (Project)Soon

Who it's for

  • Python developers ready to build modern backend web services
  • Full-stack developers wanting a fast, type-safe API framework
  • Students transitioning from script writing to backend engineering

What you need

  • Solid Python fundamentals including functions, classes, and basic type hints
  • A computer with Python 3.12+ and VS Code installed