Skip to course content
Free FastAPI backend course

FastAPI for AI Backend Development

Module 01 Activity

Scenario

Someone has proposed building an API. Establish whether it is the right shape and what it would promise.

What you build

A written contract for one endpoint, with the shape decision argued.

Steps

  1. Describe what needs to happen and say whether anything outside your process needs to call it. If not, say so plainly.
  2. Write the contract: request, response, every error status, and the guarantees you are prepared to keep.
  3. For each guarantee, name how you would test it.
  4. Decide which handlers wait on something external and which do CPU work, and choose async def or def for each with a reason.
  5. Work down the six capability stages and mark where your requirement stops.
  6. Say what you are deliberately not building yet.

Evidence to hand in

Review checklist