Skip to course content
Free FastAPI backend course

FastAPI for AI Backend Development

Module 15 Activity

Scenario

The capstone: a tested, AI-ready FastAPI service with a contract someone else could build against.

What you build

A complete service - contract, layered structure, offline suite, bounds and instrumentation - with a handover naming its gaps.

Steps

  1. Write the contract including every error and the guarantees you will keep, plus what is out of scope and the budget.
  2. Build it in layers, and state the import rules that keep the boundaries.
  3. Write the suite so nearly every test runs offline, including one for invalid model output.
  4. Decide the logged fields, the never-logged list, every bound and the alerts, before the first real request.
  5. Enforce every bound in code - input size, daily budget, timeout, rate limit.
  6. Write the handover with accepted limits, untested areas, an owner and next steps.

Evidence to hand in

Review checklist