Book
A Book about Pythonic Application Architecture Patterns for Managing Complexity. Cosmos is the Opposite of Chaos you see. O'R. wouldn't actually let us call it "Cosmic Python" tho.
Install / Use
/learn @cosmicpython/BookREADME
Book repo
| Book | Code |
| ---- | ---- |
| |
|
Table of Contents
O'Reilly have generously said that we will be able to publish this book under a CC license, In the meantime, pull requests, typofixes, and more substantial feedback + suggestions are enthusiastically solicited.
| Chapter | |
| ------- | ----- |
| Preface | |
| Introduction: Why do our designs go wrong?| ||
| Part 1 Intro | |
| Chapter 1: Domain Model | |
| Chapter 2: Repository |
|
| Chapter 3: Interlude: Abstractions | |
| Chapter 4: Service Layer (and Flask API) |
|
| Chapter 5: TDD in High Gear and Low Gear |
|
| Chapter 6: Unit of Work |
|
| Chapter 7: Aggregates |
|
| Part 2 Intro | |
| Chapter 8: Domain Events and a Simple Message Bus |
|
| Chapter 9: Going to Town on the MessageBus |
|
| Chapter 10: Commands |
|
| Chapter 11: External Events for Integration |
|
| Chapter 12: CQRS |
|
| Chapter 13: Dependency Injection |
|
| Epilogue: How do I get there from here? | |
| Appendix A: Recap table | |
| Appendix B: Project Structure |
|
| Appendix C: A major infrastructure change, made easy |
|
| Appendix D: Django |
|
| Appendix F: Validation | |
Below is just instructions for me and bob really.
Dependencies:
- asciidoctor
- Pygments (for syntax higlighting)
- asciidoctor-diagram (to render images from the text sources in
./images)
gem install asciidoctor
python2 -m pip install --user pygments
gem install pygments.rb
gem install asciidoctor-diagram
Commands
make html # builds local .html versions of each chapter
make test # does a sanity-check of the code listings
Related Skills
node-connect
338.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
338.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.6kCommit, push, and open a PR
