Computer ScienceScience & MathematicsEconomics & FinanceBusiness & ManagementPolitics & GovernmentHistoryPhilosophy

Architecture Patterns with Python

Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices

by Harry Percival, Bob Gregory

Architecture Patterns with Python

Subscribe to new books via dBooks.org telegram channel

Join
DescriptionTable of ContentsDetailsReport an issue

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 open book is licensed under a Creative Commons License (CC BY-NC-ND). Free download in PDF format is not available. You can read Architecture Patterns with Python book online for free.

Table of Contents

PART 1
Building an Architecture to Support Domain Modeling
Chapter 1
Domain Modeling
Chapter 2
Repository Pattern
Chapter 3
A Brief Interlude: On Coupling and Abstractions
Chapter 4
Our First Use Case: Flask API and Service Layer
Chapter 5
TDD in High Gear and Low Gear
Chapter 6
Unit of Work Pattern
Chapter 7
Aggregates and Consistency Boundaries
PART 2
Event-Driven Architecture
Chapter 8
Events and the Message Bus
Chapter 9
Going to Town on the Message Bus
Chapter 10
Commands and Command Handler
Chapter 11
Event-Driven Architecture: Using Events to Integrate Microservices
Chapter 12
Command-Query Responsibility Segregation (CQRS)
Chapter 13
Dependency Injection (and Bootstrapping)

Book Details

Title
Architecture Patterns with Python
Subject
Computer Science
Publisher
O'Reilly Media
Published
2020
Pages
304
Edition
1
Language
English
ISBN13 Digital
9781492052203
ISBN10 Digital
1492052205
License
CC BY-NC-ND

Related Books

Programming for Computations - Python
This book presents computer programming as a key method for solving mathematical problems. This second edition of the well-received book has been extensively revised: All code is now written in Python version 3.6 (no longer version 2.7). In addition, the two first chapters of the previous edition have been extended and split up into five new chapte...
Programming for Computations - Python
This book presents computer programming as a key method for solving mathematical problems. There are two versions of the book, one for MATLAB and one for Python. The book was inspired by the Springer book TCSE 6: A Primer on Scientific Programming with Python (by Langtangen), but the style is more accessible and concise, in keeping with the needs o...
Hacking Secret Ciphers with Python
There are many books that teach beginners how to write secret messages using ciphers. There are a couple books that teach beginners how to hack ciphers. As far as I can tell, there are no books to teach beginners how to write programs to hack ciphers. This book fills that gap. This book is for complete beginners who do not know anything about en...
Making Games with Python & Pygame
Making Games with Python & Pygame covers the Pygame library with the source code for 11 games. Making Games was written as a sequel for the same age range as Invent with Python. Once you have an understanding of the basics of Python programming, you can now expand your abilities using the Pygame library to make games with graphics, animation, a...
Invent Your Own Computer Games with Python
Invent Your Own Computer Games with Python teaches you how to program in the Python language. Each chapter gives you the complete source code for a new game, and then teaches the programming concepts from the examples. Games include Guess the Number, Hangman, Tic Tac Toe, and Reversi. This book also has an introduction to making games with 2D graph...
Create Graphical User Interfaces with Python
Add buttons, boxes, pictures and colours and more to your Python programs using the guizero library, which is quick, accessible, and understandable for all. This 156-page book is suitable for everyone, from beginners to experienced Python programmers who want to explore graphical user interfaces (GUIs). There are ten fun projects for you to c...