Skip to main content

PyPI caching mirror

Project description

proxpi

Build status codecov

PyPI caching mirror

  • Host a proxy PyPI mirror server with caching
    • Cache the index (package list and packages' file list)
    • Cache the package files
  • Support multiple indices
  • Set index cache times-to-live (individually for each index)
  • Set files cache max-size on disk

Installation

pip install proxpi

Install coloredlogs as well to get coloured logging

Usage

FLASK_APP=proxpi.server flask run
pip install --index-url http://127.0.0.1:5000/index/ simplejson

Cache invalidation

curl -X DELETE http://127.0.0.1:5000/cache/simplejson
curl -X DELETE http://127.0.0.1:5000/cache/list

Environment variables

  • PROXPI_INDEX_URL: index URL, default: https://pypi.org/simple/
  • PROXPI_INDEX_TTL: index cache time-to-live in seconds, default: 30 minutes. Disable index-cache by setting this to 0
  • PROXPI_EXTRA_INDEX_URLS: extra index URLs (white-space separated)
  • PROXPI_EXTRA_INDEX_TTLS: corresponding extra index cache times-to-live in seconds (white-space separated), default: 3 minutes, cache disabled when 0
  • PROXPI_CACHE_SIZE: size of downloaded package files cache (bytes), default 5GB. Disable files-cache by setting this to 0

Docker

docker run -p 5000:5000 epicwink/proxpi

Project details


Download files

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

Source Distribution

proxpi-0.1.0a3.tar.gz (7.7 kB view hashes)

Uploaded Source

Built Distribution

proxpi-0.1.0a3-py3-none-any.whl (8.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page