New
High Performance Python
Practical Performant Programming for Humans
by Ian Ozsvald, Micha Gorelick
Pages
378
Published
2019
Software design principles and best practices for intermediate Python developers
Move beyond working code and write Python that is maintainable, testable, and built to last.
Practices of the Python Pro teaches you the design principles and engineering habits that separate a working script from production-quality software. Dane Hillard walks through separation of concerns, abstraction, testing, and performance with concrete Python examples β giving intermediate developers the mental models they need to write code that other people can read, extend, and trust.
Getting Python code to run is the easy part. Getting it to stay readable six months later, survive a new team member, and scale without a rewrite β that takes a different kind of skill. Practices of the Python Pro closes that gap.
Dane Hillard has spent years watching talented developers plateau because no one taught them software design. This book is the course they never got. It covers the principles that experienced engineers apply instinctively: separation of concerns, loose coupling, high cohesion, abstraction, and encapsulation. Each principle is explained clearly, then demonstrated in Python code you would recognise from your own projects.
The book is not a tour of the standard library. It will not teach you syntax. What it will teach you is how to think about structure before you write the first function, how to recognise when a module is doing too much, and how to refactor toward clarity without breaking what already works.
You will also learn how to test your designs. The chapters on testing are not a pytest tutorial β they show you how testability is a design quality, and how writing tests forces you to confront the coupling and hidden dependencies you did not know were there.
Performance, packaging, and the practical mechanics of sharing code round out the later chapters, so you finish with a complete picture of what it means to ship software rather than just write it.
If you can write Python but feel unsure how to organise a real project, this book gives you the framework to make confident decisions and the vocabulary to explain them to your team.
Establishes why software design matters beyond correctness, introducing the cost of poor structure through realistic Python examples you will return to throughout the book.
Shows how to identify responsibilities inside a codebase and split them into focused modules and functions, reducing the cognitive load of every future change.
Teaches you to hide implementation details behind stable interfaces, using classes and functions to expose only what callers need to know.
Explains how to profile Python code to find real bottlenecks, then introduces data structures and algorithmic choices that make a measurable difference.
Reframes testing as a design activity: you will write tests that reveal hidden coupling and learn to structure code so that testing becomes straightforward rather than painful.
Applies the earlier theory to a running case study, walking through the decisions involved in breaking a tangled module into well-defined layers.
Covers the open-closed principle and plugin patterns in Python, giving you techniques for adding behaviour without editing existing code.
Introduces dependency injection and inversion of control as practical tools for decoupling components and making them independently testable.
Consolidates the coupling concepts with worked examples of refactoring tightly coupled code, tracking the improvement in testability and clarity at each step.
Walks through the Python packaging ecosystem so you can structure a project, write a setup configuration, and publish code that other developers can install and depend on.
Yes. The book assumes you are comfortable writing Python functions, classes, and modules. It does not teach syntax or language basics β it teaches you what to do with the language once you know it.
Completely. The design principles covered apply to any Python project: scripts, data pipelines, CLI tools, libraries, or services. The examples are general enough to map onto whatever you are building.
Yes, all code examples use Python 3. The book was published in late 2019, so examples reflect the Python 3 idioms current at that time, which remain valid and widely used.
No. The book deliberately stays framework-agnostic so the principles transfer regardless of which tools you use. Framework-specific knowledge is not required and not the focus.
It is a strong fit. The book covers the vocabulary and mental models that senior engineers use to evaluate design, which makes it useful both for producing better code and for discussing architecture with your team.
New
Practical Performant Programming for Humans
by Ian Ozsvald, Micha Gorelick
New
A thorough reference to Python language fundamentals, from syntax and data types to classes and advanced tools
by Mark Lutz
New
A Hands-On, Project-Based Introduction to Programming in Python
by Eric Matthes
New
A Concise Desktop Reference for Python 3 β Language, Libraries, and Best Practices
by Alex Martelli, Anna Martelli Ravenscroft, Paul McGuire, Steve Holden