Check and download package source files from PyPI.
Project description
pypi-files
Check and download package source files from PyPI.
Rqeuirement
- Python: tested with 3.6 or later
Install
$ pip install pypi-files
Usage
Usage: pf <command> [--package <pacakge>] [--version <version>] [--file <yaml file>] [--destination <destination>]
command:
get_file_list Show package source file URLs.
download Download package source files.
To get package source files, use pf get_file_list
:
pf get_file_list [--package <pacakge>] [--version <version>] [--file <yaml file>]
You can give a package name by --pacakge
and give a version as an option.
If --version
is not passed, the latest version will be used.
$ pf get_file_list --package pandas --version 1.3.2
https://files.pythonhosted.org/packages/cf/f7/6c0dd488b5f5f1c0c1a48637df45046334d0be684faaf3536429f14aa9de/pandas-1.3.2.tar.gz
You can also use YAML file with a package list.
The file should be a list of dictionaries (<package>: <version>
) like:
---
- pandas: 1.3.2
- numpy: latest
- numpy: 1.21.0
If you want the latest version, use latest
.
$ pf get_file_list --files ./packages.yml
https://files.pythonhosted.org/packages/cf/f7/6c0dd488b5f5f1c0c1a48637df45046334d0be684faaf3536429f14aa9de/pandas-1.3.2.tar.gz
https://files.pythonhosted.org/packages/3a/be/650f9c091ef71cb01d735775d554e068752d3ff63d7943b26316dc401749/numpy-1.21.2.zip
https://files.pythonhosted.org/packages/66/03/818876390c7ff4484d5a05398a618cfdaf0a2b9abb3a7c7ccd59fe181008/numpy-1.21.0.zip
To download package source files, use download
.
You can set output destination by --destination
.
pf download [--package <pacakge>] [--version <version>] [--file <yaml file>] [--destination <destination>]
The default destination is current directory (./
).
$ pf download --package pandas --version 1.3.2
Downloading https://files.pythonhosted.org/packages/cf/f7/6c0dd488b5f5f1c0c1a48637df45046334d0be684faaf3536429f14aa9de/pandas-1.3.2.tar.gz to ./pandas-1.3.2.tar.gz...
$ ls
pandas-1.3.2.tar.gz
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
pypi-files-0.1.1.tar.gz
(7.4 kB
view hashes)
Built Distribution
Close
Hashes for pypi_files-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc17b541d9022ce2591faf6da844fc73ba198699a8bf02706003633b590e11dc |
|
MD5 | 9028778a878802f488e0cf63e3e787b8 |
|
BLAKE2b-256 | feeea77a6470dd036b1ba06967c6eccbf2553adfc77947006a4f9812fcbf56fb |