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 four 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.6.tar.gz
(9.5 kB
view details)
Built Distribution
File details
Details for the file pypi-downloader-2.0.6.tar.gz
.
File metadata
- Download URL: pypi-downloader-2.0.6.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 125d0e43eb9091306eabc6e3bbd2221caee29c9b265696ae9366f88cfe951715 |
|
MD5 | 777f19072c075366a0321aa685cc5a89 |
|
BLAKE2b-256 | 5c0eb0942ae6b1f4282c037915a1453d52451a4860c32e517fee967b2949340c |
Provenance
File details
Details for the file pypi_downloader-2.0.6-py3-none-any.whl
.
File metadata
- Download URL: pypi_downloader-2.0.6-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1326bde13f49d20de90f235403c5610894a0b1571bbcf07287ca2426f860999e |
|
MD5 | e28a5be0359e8cfd81da1b3dc6e202ce |
|
BLAKE2b-256 | 570d86bba73f445117aa6d2569a55c8a1c13b7d0d84802c36089cd957bb12c6c |