pypiserver serves Python packages from local directories so pip and twine treat it like PyPI, with simpler setup than the official warehouse stack.
Overview
pypiserver is a small PyPI-compatible package index you run on your own infrastructure. It is built on Bottle and reads wheels, eggs, source distributions, and related signatures from ordinary filesystem directories.
Standard Python packaging clients interact with it the same way they interact with PyPI.org. Packages can be uploaded with pip, setuptools, twine, or other upload tools, or copied into the package directory directly. If a requested package is missing, the server can redirect clients to the public PyPI index so one URL serves both private and upstream artifacts.
Operations cover Docker images, compose files, systemd and supervisor startup, reverse proxies with nginx or Traefik, optional HTTPS, and alternative WSGI servers such as gunicorn. Upload authentication can use Apache-style htpasswd files or custom auth hooks. Optional directory caching with watchdog improves performance when hosting very large indexes.
Project documentation contrasts pypiserver with Warehouse, noting that Warehouse targets the public PyPI.org service and is not positioned as a generic private index. pypiserver aims for a quicker path to a working private or team index on Python 3.10 and later.
Key features
- PyPI-compatible HTTP API
- Directory-backed package storage
- pip and twine uploads
- Fallback redirect to PyPI.org
- Docker image and compose
- htpasswd upload authentication
- Package index update helper
- Reverse proxy and HTTPS recipes
Use cases
- Private team package indexes
- Air-gapped pip mirrors
- Internal wheel distribution
- CI artifact hosting for pip
- Combo local and upstream index