Member-only story

Python Project Setup: A Step-by-Step Guide to Industry Best Practices

Learn how to properly setup and kickstart your python project. And all the nitty-gritty details of which tools to use and how to configure them together, through building a simple CLI.

16 min readJun 5, 2023

--

Photo by Chris Reid on Unsplash

As you start working on your python project, you’ll likely need to set it up in a consistent and collaboration-friendly way. In this article, I’ll describe a setup that works great for our projects at Turo, and also my personal ones. It includes many industry best practices (semantic versioning, pre-commit, linting, or how to release code to mention but a few).

In short, we’ll cover how to properly install python, structure your code, run automated checks both on local with pre-commit and the server side with GitHub Actions (aka GHA).

This article covers quite a few topics. To ease the reading, each section will usually be split in two parts:

  • 📚 for the theory part
  • 🛠️ for the practical part (i.e. the commands you need to run to reproduce).

Sometimes a 💡 section will also indicate a coding tip or trick.

Table of Contents

--

--

Armand Sauzay
Armand Sauzay

Written by Armand Sauzay

Applied Scientist at Turo - ex Airbnb - ex Amazon - UC Berkeley

Responses (7)