6 · 15 lessons

Architecture in Python

Layers, ports and adapters, repositories, services and events: structure an application so each part can be tested alone.

Progress and your code are kept in this browser only.

  1. 1Layers and import direction
  2. 2Functional core, imperative shell
  3. 3Dependency inversion
  4. 4Entities and value objects
  5. 5A state machine for a workflow
  6. 6The repository pattern
  7. 7A service layer
  8. 8Unit of work
  9. 9Domain events and handlers
  10. 10Commands and queries
  11. 11Ports and adapters
  12. 12Errors at layer boundaries
  13. 13Caching behind an interface
  14. 14Plugin registries
  15. 15Configuration and wiring