This week we welcome Claudio Jolowicz (@cjolowicz) as our PyDev of the Week! Claudio is the author of an upcoming book titled Hypermodern Python Tooling. Claudio writes about Python on Medium. You can also see what Claudio has been working on over on GitHub.
Let’s take a few moments to get to know Claudio better!
Can you tell us a little about yourself?
I’m a dad of two daughters in pre-school age and a software engineer at Cloudflare, where I work on the Web Application Firewall. I’m also currently writing a book for O’Reilly about Python developer tooling, titled Hypermodern Python Tooling. (It’s in Early Release, you can take a peek!) I spent most of the past decade as a session and tour musician, playing saxophones, flutes, and keyboards with over a hundred different artists, particularly from West Africa and the Caribbean. I decided to take a break from touring in 2019, and have since become active in the open-source community and written an article series about Python developer tooling, which I’m now updating and turning into this book. I’ve been fascinated with computer programming since childhood. I live in Berlin, Germany.
Why did you start using Python?
I first came across Python in a book about UNIX I was reading at college, at the time of Python 2.3. Its intuitive and elegant design immediately struck a chord with me. Coming batteries included was also a big motivator, at a time when PyPI was only just being launched. I love how Python is simple at the surface but lets you access its inner workings when you need to, the special methods, descriptors, metaclasses, or import machinery. I advocated for Python in every team I joined, and it was never hard to convince anybody. Most of the time, Python wasn’t the main implementation language. We’d work in C++ (or now Go and Rust), while Python was used for building, testing, and prototyping.
What other programming languages do you know and which is your favorite?
What projects are you working on now?
All my time goes into the book right now. It’s a great opportunity to take a look at how the Python packaging and tooling ecosystem has evolved in the past three years, and so much has happened! I also maintain the Hypermodern Python Cookiecutter, a Python project template using Poetry for packaging, Nox for automation, and GitHub Actions for CI/CD. It comes with testing, linting, code formatting, type-checking, and documentation, and aims to help you write better code and maintain it, without getting in your way too much.
Which Python libraries are your favorite (core or 3rd party)?
I’ll go with attrs. It’s as much about its practical value as it is about its philosophy. You start using attrs (or dataclasses) because it removes the boilerplate from your class definitions. But attrs also gently nudges you towards a domain-driven software design with immutable value objects at the core of your application. If you’re doing everything right, your domain layer has all of the business logic and none of the dependencies of your application. Keep persistence, messaging, and presentation out of the domain layer, and you end up with software that’s testable and easy to change.
Is there anything else you’d like to say?
Python packaging is actually delightful to use these days. If you haven’t seen some of the recent developments, I recommend starting with the Packaging Python Projects tutorial at the Python Packaging User Guide, which is a short read. For very small projects like single-file scripts, I love dropping a minimal `pyproject.toml` next to the script and running `pipx install -e .`. This will install the script and its third-party dependencies into an isolated environment and place the script on your `PATH`. No need to activate the virtualenv, no need to reinstall when you edit the script. Finally, check out pipx and Nox.
Thanks for doing the interview, Claudio!