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 two scripts:
- a multithreaded version of the main script, pypi-downloader-mt.py, as command: pypi-downloader
- a helper script to get the current list of packages from the pypi index site currently located at: https://pypi.org/, as command: pypi-packages
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 (threads and packages) 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
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
pypi-downloader-2.0.3.tar.gz
(9.0 kB
view hashes)
Built Distribution
Close
Hashes for pypi_downloader-2.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0a1f0f7436858ed178eb622e72e69a8ea7748b0939287fbadc1d3d82ecece10 |
|
MD5 | 207dadd13afe76c2de12b0de0388ef0b |
|
BLAKE2b-256 | d9b5e5ee3a26fc60c9c03a36d3ad00581b583d85e55049793e8dbff00877c5e9 |