Hey HN,
I just published on Leanpub a free book, "Clean Architectures in Python". It's a humble attempt to organise and expand some posts I published on my blog in the last years.
You can find it here: https://leanpub.com/clean-architectures-in-python
The main content is divided in two parts, this is a brief overview of the table of contents
* Part 1 - Tools
- Chapter 1 - Introduction to TDD
- Chapter 2 - On unit testing
- Chapter 3 - Mocks
* Part 2 - The clean architecture
- Chapter 1 - Components of a clean architecture
- Chapter 2 - A basic example
- Chapter 3 - Error management
- Chapter 4 - Database repositories
Some highlights:
- The book is written with beginners in mind
- It contains 3 full projects, two small ones to introduce TDD and mocks, a bigger one to describe the clean architecture approach
- Each project is explained step-by-step, and each step is linked to a tag in a companion repository on GitHub
The book is free, but if you want to contribute I will definitely appreciate the help.
My target is to encourage the discussion about software architectures, both in the Python community and outside it.
I hope you will enjoy the book! Please spread the news on your favourite social network
I would add a very important second part here "you think is correct".
An introduction to TDD that starts by implementing a function called `add` with `pass` or `return 9` is somehow deeply irritating to me.
The example would be so much closer to real world usage if you started with `a + b` and then realized the tests also require you to support 3 arguments.
Also: you introduced the test for three arguments after you wrote the first code for `add`.