Understanding Best Practice Python Tooling by Comparing Popular Project Templates

A look at well-known and up-and-coming Python tools

Jonas Kemper

--

Target audience: Intermediate Python programmers.

TL;DR: Use Flake8, pytest, and Sphinx in your current Python project. Also evaluate pre-commit, Black, and Pylint. For your next project, consider adding Poetry and Dependabot.

Update: There's a 2022 Update for this post here -> https://medium.com/@jonas.r.kemper/2022-update-understanding-best-practice-python-tooling-by-comparing-popular-project-templates-5872602fe617 .

Overview

I always find it difficult to have a balanced opinion about Python best-practices. The hype-driven tech world makes it difficult to filter signal from noise.

A newly-advertised tool often sounds great on paper, but is it actually making me a more effective engineer? Or is it just one more thing I need to look after, adding more complexity than value?

I had a vague idea of what I considered best-practice, but it was mostly based on anecdotal evidence and casual conversations. Then, in the last couple of weeks, I started to look at all the Python project templates (i.e. cookiecutters) I could find.

--

--