Loading lesson…
Level 1 · Apprentice0 XP
Typed HTTP endpoints, validation, streaming responses and dependency injection.
Step 1 / 6
ProblemA summariser works in a notebook. The product team wants to call it from the website. Someone copies the code into a Flask app with no validation, and empty inputs crash it.
← → step
Before this: Pydantic and async Python
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Build a FastAPI service with a validated /summarise endpoint that streams tokens, an API-key check as a dependency, and a test that overrides the model client with a fake using TestClient.