Architecture Patterns with Python

Free online book on applying DDD, ports and adapters, and event-driven architecture in Python — by the authors of the famous “Cosmic Python”

Visit Architecture Patterns with Python →
Books

Free and read online in full, “Cosmic Python” walks through applying domain-driven design, the ports-and-adapters (hexagonal) pattern, and event-driven architecture to a real Python application — not abstract theory, but a working example codebase built up chapter by chapter.

Aimed at developers who already know Python well and are hitting the limits of “it works but it’s a mess” as an application grows — architecture-level thinking rather than syntax or idioms, a step beyond what Fluent Python or ArjanCodes cover.