TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Member-only story

Hands-on Tutorials

Create Your Custom, private Python Package That You Can PIP Install From Your Git Repository

Share your self-built Python package using your git repo.

Mike Huls
6 min readJul 3, 2021

--

Distribute you code like this bee distributes pollen (image by Dimitry Grigoriev on Unsplash)

You’ve created some convenient script that you would like your coworkers or others to use. In many companies, code like this is copied and emailed to one another. Although email is a very accessible tool to share code, we’re not living in the 90s anymore so let’s distribute your code in a smart way.

This article tackles the problem described above in two steps: packaging and distribution. First, we’ll focus on transforming your code into a python package so that people can easily install it. Then we’ll put the package into a repository (like on Github or Bitbucket) so people have access to it. At the end of this article you:

  • understand the requirements of a Python package
  • are able to build a Python package or transform an existing project into a package
  • are able to pip install the self-built package from the repository
  • are able to update your package

Let’s code!

Goals and preparations

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Mike Huls
Mike Huls

Written by Mike Huls

I write about interesting programming-related things: techniques, system architecture, software design and how to apply them in the best way. — mikehuls.com

Responses (8)