How to start any professional Python Package project

Tomer Gabay
23 min readOct 11, 2022

Including test automation, creating documentation on ReadTheDocs and publishing to PyPi.

Photo by Sticker Mule on Unsplash


Virtually everyone who uses Python makes use of PyPi, the Python Package Index where open-source code can be downloaded from (which is consulted when using $ pip install). Famous packages as pandas and Numpy are all on PyPi. It’s actually really easy to publish your own project to PyPi. However, to simply write some code and publish it to PyPi isn’t a professional or sustainable approach. The following problems can arise:

  • Lack of or absence of documentation can cause other people to not know how to use your package, or you yourself forget it after a few weeks, months or years.
  • Lack of or absence of (automated) tests can cause broken code to enter your package unnoticed when making changes.
  • Changes to your package’s dependencies can cause your code to break.
  • Badly or inconsistently formatted code can make the code hard to read.

In this article we will tackle all the steps anyone should take when wanting to create a professional (open source) package. This includes e.g. project management, dependency management, automated testing, creating documentation and publishing it on ReadTheDocs, and…



Tomer Gabay

Data Scientist / Machine Learning Engineer / Python Developer from the Netherlands. Writing articles and publishing open source code on a regular basis.