Skip to main content

A very simple pypi cache

Project description

A very simple pypi cache.

features

  • uses aiohttp, aiofiles, inotipy

  • queries metadata via pypi JSON API

  • filesystem is the database

  • serve releases while downloading

todo

  • private channels with user, groups and permissions

  • use python-libaio for file stuff

  • nice ui

running the cache

# pypare --help
Usage: pypare [OPTIONS] COMMAND [ARGS]...

Options:
  --log-level [NOTSET|DEBUG|INFO|WARNING|ERROR|CRITICAL]
                                  The logging level.  [default: INFO]
  --loop [asyncio|uvloop]         Use a different loop policy.  [default:
                                  asyncio]
  --version                       Show the version and exit.
  --help                          Show this message and exit.

Commands:
  pypi  Run a simple pypi caching proxy.
# pypare pypi --help
Usage: pypare pypi [OPTIONS]

  Run a simple pypi caching proxy.

Options:
  -p, --port INTEGER          The port to run the server  [default: 3141]
  -h, --host TEXT             The server host IP.  [default: 0.0.0.0]
  -b, --base-path PATH        The base path for this application.  [default:
                              /pypi]
  -c, --cache-root DIRECTORY  The cache directory, where files are stored.
                              [default: ~/.cache/pypare]
  --cache-timeout INTEGER     The age of metatdata, when it will be refreshed.
                              [default: 86400]
  --plugin LIST               A plugin in pkg_resources notation to load.
  --help                      Show this message and exit.

Run from virtual environment:

pip install pypare

pypare pypi --cache-dir /tmp/pypi-data

Run in docker:

docker run -it diefans/pypare:latest pypi

Run as zipapp:

shiv pypare -c pypare -o ~/.local/bin/pypare -p ~/.pyenv/versions/3.7.0/bin/python

pypare pypi --cache-dir /tmp/pypi-data

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

pypare-0.3.0.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

pypare-0.3.0-py3-none-any.whl (67.5 kB view details)

Uploaded Python 3

File details

Details for the file pypare-0.3.0.tar.gz.

File metadata

  • Download URL: pypare-0.3.0.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for pypare-0.3.0.tar.gz
Algorithm Hash digest
SHA256 14e21f14b20455c47a57dfeb524728b25497220a8283dce0440681a5ab58fdbe
MD5 2fb1692454db92f6373a83c4765817f7
BLAKE2b-256 b48a1cfcadd4f9a3be22c39b648020712166c15e986f56a093450ffcb6eeb3e6

See more details on using hashes here.

File details

Details for the file pypare-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pypare-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 67.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for pypare-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d8f0be207a300d3ad24587bda9cdddb9c4b2519afa09a2dd37f4f7c72a615c7
MD5 6691e62b8bcc91197e03db5c555748f3
BLAKE2b-256 07f3decac6a283186ff29eee07cd12df99daa020c02fb0ea77580d7e1cc2d2de

See more details on using hashes here.

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