Skip to main content

Use proxypypi to set up a transparent caching proxy to PyPI (https://pypy.python.org/) to:

  1. make your installs resilient against Internet/PyPI issues,

  2. speed up your installs significantly (after the first one),

  3. prevent problems installing packages that are removed from distribution by the author,

  4. allow installation of packages from within a firewalled environment where the host performing the installation does not have Internet access, and

  5. allow hosting and installation of private packages.

When the proxy is asked about a package it doesn’t know it automatically goes off and fetches the file download list for the package, rewriting all references (PyPI and external) so they appear to be local. On request of one of those now-local package file references it performs a background fetch of the file contents and serves up the new file data to the pip request (thus keeping that request alive despite its very short timeout duration).

Why Another One?

There’s a lot of PyPI-alike implementations and “proxy” servers out there. This proxy differs from almost all others (save devpi-server) in that it automatically relocates package download files from the Internet to your local server. It differs from devpi-server in that it has no external database requirement (just a filesystem is needed) making deployment much simpler (at least for me).

Usage

Setup of proxypypi requires:

  1. “pip install proxypypi”

  2. cd to some directory you would like files to be cached in

  3. proxypypi run

There are some command-line arguments (see “proxypypi -h”) that allow some run-time behaviour control. Notably “-d” which can configure the directory to cache in.

Additionally the proxy may run in the background, in which case you need to supply three additional command-line arguments: “-P” (PID file), “-l” (log file) and “-o” (console output file) and use one of the daemon control commands instead of “run”. See “proxypypi -h” for the commands.

Once running you may perform pip installs using the proxy by including the proxy in the pip command line using the “-i” argument:

pip install -i http://proxy_host:proxy_port/simple/ package_to_install

Any packages not cached will be fetched into the cache and the install will continue as normal.

Upgrading Cached Packages

This isn’t done yet :-)

Version History

  • 1.0 first public releae

  • 1.0.1 clear up handling of paths to daemon files

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

proxypypi-1.0.1.tar.gz (10.3 kB view details)

Uploaded Source

File details

Details for the file proxypypi-1.0.1.tar.gz.

File metadata

  • Download URL: proxypypi-1.0.1.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for proxypypi-1.0.1.tar.gz
Algorithm Hash digest
SHA256 bd20a68a465b3c17fecf65accb4846c07f6d2bdec9e61d2ce026f43d7bc7add4
MD5 9e7b7cbda567adfefa7ceec91a552989
BLAKE2b-256 ed3ffc887aa2a9485e885e6d700116d78e276c1d938720cb8bbd3a2143cdc68b

See more details on using hashes here.

Release history Release notifications | RSS feed

1.2.2

1 file

1.2.1

1 file

1.2

1 file

This release

1.0.1 This release

1 file

1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page