Web, data & APIs · Course 4 of 8

FastAPI and HTTPX in practice

Fourteen offline API lessons: requests, response models, dependencies, routers, middleware, background tasks, HTTP clients and a small CRUD service.

0 of 14 lessons passed

Start lesson 1

Lessons

Progress and your code are kept in this browser only.

  1. Run an API without opening a socket
  2. Validate query bounds at the route
  3. Validate a JSON request body
  4. Filter output through a response model
  5. Turn a missing resource into HTTP 404
  6. Inject a request dependency
  7. Replace a dependency in a test
  8. Compose routes under a prefix
  9. Add a response header in middleware
  10. Observe an awaited background task
  11. Inspect a client request with MockTransport
  12. Separate HTTP status from transport failure
  13. Share one async client across a batch
  14. Build a small isolated CRUD application

All courses