19 Sep 2025 · Hynek Schlawack
Python appears to be everywhere nowadays! How did it happen, that a language that almost died in the Python 2 to 3 process is now the lingua franca a default choice when people talk about programming? There must be some secret superpower and I think I found it!
16 May 2025 · Hynek Schlawack
Ever had this weird gut feeling that something is off in your code, but couldn’t put the finger on why? Are you starting your projects with the best intentions, following all best practices, and still feel like your architecture turns weird eventually?
2 Sep 2024 · Hynek Schlawack
Whenever I publish something about my Python Docker workflows, I invariably get challenged about whether it makes sense to use virtual environments in Docker containers. As always, it’s a trade-off, and I err on the side of standards and predictability.
28 Aug 2024 · Hynek Schlawack
Starting with 0.3.0 , Astral’s uv brought many great features, including support for cross-platform lock files uv.lock . Together with subsequent fixes, it has become Python’s finest workflow tool for my (non-scientific) use cases. Here’s how I build production-ready containers, as fast as possible.
2 Apr 2024 · Hynek Schlawack
One of my first TIL entries was about how you can imitate Node’s node_modules semantics in Python on UNIX-like operating systems. A lot has happened since then (to the better!) and it’s time for an update. direnv still rocks, though.
21 Dec 2023 · Hynek Schlawack
When contributing to other users’ repositories, always start a new branch in your fork.
26 Jun 2023 · Hynek Schlawack
No, it’s not (just) run-parallel – let’s cut the local tox runtime by 75%!
22 Apr 2023 · Hynek Schlawack
Ever seen a code base where understanding a simple method meant jumping through tangled class hierarchies? We all have! And while “Favor composition over inheritance!” is almost as old as object-oriented programming, strictly avoiding all types of subclassing leads to verbose, un-Pythonic code. So, what to do?
18 Jan 2023 · Hynek Schlawack
Ever since I got involved with open-source Python projects, tox has been vital for testing packages across Python versions (and other factors). However, lately, I’ve been increasingly using Nox for my projects instead. Since I’ve been asked why repeatedly, I’ll sum up my thoughts.
9 Jan 2023 · Hynek Schlawack
Why does DYLD_LIBRARY_PATH keep disappearing!?
19 Sep 2022 · Hynek Schlawack
A love letter to tools that changed everything for me.
29 Jul 2022 · Hynek Schlawack
One of my (slowly evaporating) reasons why I like putting packaging metadata into an executable setup.py is the ability to have optional dependencies that are combinations of others. As of pip 21.2, this is possible without running code.
21 Jun 2022 · Hynek Schlawack
A common issue when writing tests for real-world software is how to deal with third-party dependencies. Let’s examine an old, but counter-intuitive principle.
28 Dec 2021 · Hynek Schlawack
An attempt at catharsis. This is a deeply personal blog post about the most influential project I’ve ever created: attrs , the progenitor of modern Python class utilities. I’m retelling its history from my perspective, how it begot dataclasses , and how I’m leading it into the future.
18 Nov 2021 · Hynek Schlawack
Codecov’s unreliability breaking CI on my open source projects has been a constant source of frustration for me for years. I have found a way to enforce coverage over a whole GitHub Actions build matrix that doesn’t rely on third-party services.
25 Aug 2021 · Hynek Schlawack
Trying out something new: today I’m launching my own Today I Learned section. In this essay I will sum up what my plans and hopes are.
22 Jun 2021 · Hynek Schlawack
The conflict between subclassing and composition is as old as object-oriented programming. The latest crop of languages like Go or Rust prove that you don’t need subclassing to successfully write code. But what’s a pragmatic approach to subclassing in Python, specifically?
28 Apr 2021 · Hynek Schlawack
This post is less about teaching and more about schadenfreude amusement for you, and catharsis for me. It’s the story of how one unfortunate HTML tag kicked me off almost all search engines and my months-long way back. And why it didn’t matter in the end.
2 Mar 2021 · Hynek Schlawack
The widely used Python package cryptography changed their build system to use Rust for low-level code, which caused an emotional GitHub thread. Enthusiasts of 32-bit hardware from the 1990s aside, a vocal faction stipulated adherence to Semantic Versioning from the maintainers, claiming it would’ve prevented all grief. I will show you not only why this is wrong but also how relying on Semantic Versioning hurts you – the user.
3 Feb 2021 · Hynek Schlawack
Lie and lay are infamously confusing to non-native speakers. It’s so bad that it sparked a cottage industry of click-baity articles full of sketchy ads. Since English is my third language, I stumbled a lot myself until I wrote this cheatsheet.