Architecture Patterns with Python
Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices



Book Details
Authors | Harry Percival, Bob Gregory |
Publisher | O'Reilly Media |
Published | 2020 |
Edition | 1st |
Paperback | 304 pages |
Language | English |
ISBN-13 | 9781492052203 |
ISBN-10 | 1492052205 |
License | Creative Commons Attribution-NonCommercial-NoDerivatives |
Book Description
As Python continues to grow in popularity, projects are becoming larger and more complex. Many Python developers are taking an interest in high-level software design patterns such as hexagonal/clean architecture, event-driven architecture, and the strategic patterns prescribed by domain-driven design (DDD). But translating those patterns into Python isn't always straightforward.
With this hands-on guide, Harry Percival and Bob Gregory from MADE.com introduce proven architectural design patterns to help Python developers manage application complexity - and get the most value out of their test suites.
Each pattern is illustrated with concrete examples in beautiful, idiomatic Python, avoiding some of the verbosity of Java and C# syntax. Patterns include:
- Dependency inversion and its links to ports and adapters (hexagonal/clean architecture);
- Domain-driven design's distinction between Entities, Value Objects, and Aggregates;
- Repository and Unit of Work patterns for persistent storage;
- Events, commands, and the message bus;
- Command-query responsibility segregation (CQRS);
- Event-driven architecture and reactive microservices.
This book is available under a Creative Commons Attribution-NonCommercial-NoDerivatives license (CC BY-NC-ND), which means that you are free to copy and distribute it, as long as you attribute the source, don't use it commercially, and don't create modified versions.
If you enjoyed the book and would like to support the author, you can purchase a printed copy (hardcover or paperback) from official retailers.