One Python Development Setup to Rule Them All

Well, not quite. But here’s what I’ve settled on after working with Python constantly since 2012.

Virtualenv and Python version management

pyenv. I consider this the best as I can install and switch between any Python version (including conda) I like with ease. If you need this functionality and you’re not using pyenv, you’re missing out.

Installing Packages & managing their versions

I use pip. New tools have waded-in in recent years, but pip works for me and is still the most widely used tool.

Along with pip, I use requirements.txt (with fixed versions if it’s an application repo, supported version ranges if it’s a package/shared library project). I use requirements-dev.txt to hold development/test packages.

Releasing Packages

I use zest.releaser. This takes the pain out of releasing packages, automating the version number bumping, HISTORY updates, tagging etc.

IDE Setup

I use VSCode, because it’s fast and easy to use from day one.
I use an array of extensions. One, in particular, makes this choice a no brainer.

  • Settings Sync” this keeps your editor config in the ‘cloud’ meaning you can log in to any computer and sync that VSCode installation and you’re good to go in seconds.

I use the built-in terminal emulator within VSCode, along with Fish shell. I use Fish for its intelligent tab completion.

Testing

I use pytest for all Python unit and integration tests. It’s the industry standard right now and much better than the alternatives (nose, unittest).

To save a huge amount of time while doing TDD I use this tool avoid switching around my development environment.


That’s it, it’s quite boring but has stood the test of time. I hope this is useful to someone, if you have any suggested improvements please comment below, or Tweet me!

3 thoughts on “One Python Development Setup to Rule Them All

  1. Pingback: One Python Development Setup to Rule Them All – Full-Stack Feed

Leave a Reply to Dr. James Davis Cancel reply

Your email address will not be published. Required fields are marked *