Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a private module pip installable?

Tags:

python

pip

I have python package which need to be installed to run a Django project?

I go into the python virtual environment and clone the module from git in site-packages folder inside lib.

What i need is to make that module pip intallable and installation access should be given only to specific people i.e that module should not be public to everyone.

like image 639
Nishant Ranjan Avatar asked Nov 02 '25 12:11

Nishant Ranjan


1 Answers

Build the python package as you normally would for a public build. For helpful step-by-step instructions on that front, check out the python docs

There are a number of ways to maintain both installability and privacy. When I looked into this for my own packages I started with the suggestions at this site. This site includes instructions on how to build your own equivalent of a PyPi server.

The solution I landed on though, I feel is quite simpler. I pushed the entire package to a private git repository hosted on github. You can then install using pip install git+[insert full url to your github repository here]. You can enforce privacy by restricting who has access to your git repository.

like image 124
Daniel Long Avatar answered Nov 04 '25 01:11

Daniel Long



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!