Learn FastAPI by writing real code

Build real Python APIs, explained like you are five: routes, Pydantic models, databases, auth, tests and deployment, with the project folders shown and a todo API capstone.

Each chapter explains one idea, shows a worked example and then asks you to write and run your own FastAPI code in the browser, with tests that check your answer.

Anyone can read the chapter list. The chapters themselves are part of licode Club.

FastAPI chapters

  1. What Is an API?
  2. Python Warm-up for APIs
  3. Your First FastAPI App
  4. Path Parameters
  5. Query Parameters
  6. Request Bodies with Pydantic
  7. Responses and Status Codes
  8. Errors and Validation
  9. Routers and Project Structure
  10. Dependencies
  11. Connecting a Database
  12. CRUD End to End
  13. Async and Await
  14. Users, Passwords and Tokens
  15. Middleware, CORS and Headers
  16. Background Tasks and File Uploads
  17. Testing Your API
  18. Settings, Secrets and Logging
  19. Deploying FastAPI
  20. Capstone: A Todo API