Python
I've been writing Python for 21 years. I wrote three different books about it, built a profiler at Datadog, created time series databases and telemetry platforms at OpenStack, and shipped production Python at Mergify for years. This page collects 71 posts spanning everything from best practices to scaling to building your own DSL.
~/shameless-plug
If you're serious about Python, check out my book Serious Python published by No Starch Press. 25,000+ copies sold. It covers project structure, distribution, testing, typing, performance, and scaling — basically everything on this page, in book form.
Books & Interviews
Three books on Python over a decade — from a self-published guide to a No Starch Press title that sold 25,000+ copies — plus interviews along the way.
- A Decade of Writing Books and Selling 25,000 Copies
- Interview: The Performance of Python
- Serious Python released!
- Scaling Python released
- Scaling Python: the interviewees
- My interview with Cool Python Codes
- Scaling Python is on its way
- The Hacker's Guide to Python 3rd edition is out
- My interview in le Journal du Hacker
- My interview about software tests and Python
- The Hacker's Guide to Python, 2nd edition!
- Making of The Hacker's Guide to Python
- The Hacker's Guide to Python released!
- Announcing The Hacker's Guide to Python
Best Practices
Opinionated guides on writing clean, correct, and maintainable Python — from methods and exceptions to profiling and type safety.
- The Hidden Cost of Badly Typed Python Wrappers
- Debugging C code on macOS
- Finding definitions from a source file and a line number in Python
- Dependencies Handling in Python
- How to Log Properly in Python
- The Best flake8 Extensions for your Python Project
- Code Style Checks in Python
- Starting your first Python project
- Is Python a Good Choice for Entreprise Projects?
- The definitive guide to Python exceptions
- Profiling Python using cProfile: a concrete case
- Timezones and Python
- Hacking Python AST: checking methods declaration
- Python bad practice, a concrete case
- Databases integration testing strategies with Python
- The definitive guide on how to use static, class or abstract methods in Python
- Python sets comparisons
Libraries & Tools
Open-source libraries I built or contributed to — retrying, logging, schema validation, daemon management, and packaging.
- Python Logging with Datadog
- Easy Python logging with daiquiri
- Python never gives up: the tenacity library
- Packaging Python software with pbr
- Pifpaf, or how to run any daemon briefly
- Data validation in Python with voluptuous
- Reading LWN.net with Pocket
- Get back up and try again: retrying in Python
- Hy, Lisp in Python
- First release of PyMuninCli
Performance & Scaling
Practical techniques for scaling Python applications — threads, asyncio, distributed coordination, zero-copy buffers, and lock-free counters.
- Atomic lock-free counters in Python
- High-Performance in Python with Zero-Copy and the Buffer Protocol
- Scaling a polling Python application with tooz
- Scaling a polling Python application with asyncio
- Scaling a polling Python application with parallelism
- Timeseries storage and data compression
- Distributed group management and locking in Python with tooz
- OpenStack Swift eventual consistency analysis & bottlenecks
Web & APIs
HTTP clients, WSGI pitfalls, sending emails, multipart forms, and caching — the unglamorous plumbing that makes web apps work.
Data & DSLs
Building filtering syntax trees, writing DSLs, and exploring functional programming patterns in Python.
Podcasts
Podcast episodes where I talked Python.
Browse all 71 Python posts chronologically.