Section 1: Lab: API, HTTP and REST Basics
- What an API is, and how requests and responses work
- RESTful APIs with GET, POST, PUT, PATCH and DELETE
- Common status codes and the JSON data format
- Introducing FastAPI and its strengths compared with other frameworks
- Lab: call real APIs with Bruno or Postman
Section 2: Lab: Starting a FastAPI Project with uv
- Install uv and let it manage Python versions
- Create a project and install fastapi[standard]
- Run the server with the fastapi dev command
- A first /hello endpoint and the automatic documentation at /docs
- Lab: a first API tested through Swagger UI
Section 3: Receiving and Validating Data with Pydantic
- Receive values from the path, query string and request body
- Create Pydantic models and set constraints with Field
- Define the response shape with response_model and status codes
- Report errors with HTTPException
- Lab: an API that validates data before saving it
Section 4: Lab: CRUD and Project Structure
- In-memory CRUD with lists and dicts
- Split files with APIRouter and group endpoints with tags
- Dependency injection with Depends
- Keep settings in environment variables
- Lab: an in-memory CRUD product management system
Section 5: Lab: Databases with SQLModel
- Run PostgreSQL 18 with Docker Compose
- Create table models and data models with SQLModel
- A session dependency and the app lifespan
- Database CRUD with pagination
- Lab: move the product system into PostgreSQL