Week 7 • Wednesday

Block 66: FastAPI: Modern API Design

Build a type-safe, auto-documented API with FastAPI.

Concepts

Code Examples

See exercise below.

Exercise

Create a FastAPI app with 3 routes: /, /items/{item_id}, /search?q=term. Test in /docs. Add a query parameter with a default value and an optional description.

Homework

Compare Flask and FastAPI: what are the 3 biggest differences for a beginner building an API? Thursday