This project can be used to mirror the pypi index using the new warehouse api.
Project description
pypi-downloader
Description
This project can be used to mirror the pypi index using the new warehouse API.
This project consists of three scripts:
- the main single threaded script pypi-downloader.py
- a multithreaded version of the main script, pypi-downloader-mt.py
- a helper script to get the current list of packages from the pypi index site currently located at: https://pypi.org/
Config file
If a config file is specified as a command line parameter, the config file uses the YAML format.
The config file consists of three sections:
- logging - Specifies a logging.dictConfig dictionary
- threads - Number of threads to use
- packages - List of packages to download, if no packages are specified, all packages are downloaded from the pypi index site
- blacklist - List of packages to not download
Note: For logging, this module uses the root logger only. Note: Values specified in the config file can be overridden by values specified on the command line.
Config file examples
Default configuration
logging: version: 1 formatters: simple: format: '[%(levelname)s]: %(message)s' handlers: console1: class: logging.StreamHandler level: ERROR formatter: simple stream: ext://sys.stderr console2: class: logging.StreamHandler level: DEBUG formatter: simple stream: ext://sys.stdout root: level: INFO stream: ext://sys.stdout handlers: [console1, console2] threads: 1 packages: blacklist:
Default configuration with packages and blacklist specified and non default thread count
` logging: version: 1 formatters: simple: format: '[%(levelname)s]: %(message)s' handlers: console1: class: logging.StreamHandler level: ERROR formatter: simple stream: ext://sys.stderr console2: class: logging.StreamHandler level: DEBUG formatter: simple stream: ext://sys.stdout root: level: INFO stream: ext://sys.stdout handlers: [console1, console2] threads: 5 packages:
- tox
- mypy
blacklist:
- pyyaml
`
Note: In the previous example, the list of packages should not have surrounding blank lines and should be indented 2 spaces under their respective key (packages or blacklist).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pypi_downloader-2.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb2e00ae081bd628aa90c317b3b781c76758e3106ee914ac933a16463a73d84c |
|
MD5 | d5a05b09c35d26af7d41ac0e975d613a |
|
BLAKE2b-256 | 2fb323b110d3c7ae1303d0ca18d2cb77bc6887a49f4babc3cab377b3496d2aa7 |