Custom PyPI Server

7th March 2019 at 8:53am
Python: Packaging

Custom PyPI server can be achieved by using pypiserver/pypiserver, cooperating with ignacysokolowski/pypi-uploader for uploading packages.


Quick start:

pip install pypiserver

# Create a directory for packages to live in
mkdir ~/packages

# Set a user name and password for authentication when uploading packages
htpasswd -c htpasswd.txt <username> <password>
./pypi-server -p 8080 -P htpasswd.txt ~/packages &


Quick start:

Write a ~/.pypirc file:

index-servers =

repository: <pypi-server>  ; e.g.
username: <username>
password: <password>
pip install pypi-uploader
pypiupload files <python-pacakges> -i internal