# pypi-files
[![pytest](https://github.com/rcmdnk/pypi-files/actions/workflows/test.yml/badge.svg)](https://github.com/rcmdnk/pypi-files/actions/workflows/test.yml)
[![version](https://img.shields.io/pypi/v/pypi-files.svg)](https://pypi.python.org/pypi/pypi-files/)
[![license](https://img.shields.io/pypi/l/pypi-files.svg)](https://pypi.python.org/pypi/pypi-files/)
Check and download package source files from PyPI.
# Rqeuirement
* Python: tested with 3.6 or later
# Install
$ pip install pypi-files
# Development
If you want to test/develop pypi-files, checkout the repository and use Poetry:
$ pip install poetry # or brew install poetry
$ git clone git@github.com/rcmdnk/pypi-files
$ cd pypi-files
$ poetry install
$ poetry run pf get_file_list pypi-files
$ # etc...
# Usage
Usage: pf <command> [--package <pacakge>] [--version <version>] [--file <yaml_file>] [--destination <destination>] [--base_url <base_url>] [--dependencies <bool>]
command:
get_file_list Show package source file URLs.
download Download package source files.
Options:
--package <package> Set packages to check. Multiple packages can be set by separating by `,`. At least one of package or file option is needed for `get_file_list` and `download` commands.
--version <version> Set versions for each packages. It should be same length of `--package` input.
--file <yaml_file> Set YAML file which has a package list.
--destination <destination> Set a destination in which download files are stored. Default is `./`.
--base_url <base_url> Set base ufl for PyPI. Default is `httss://pypi.osg/pypi`.
--dependencies <bool> Set 1 to include all package dependencies.
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
`version` can be a file name of wheel, like `pandas-1.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl`.
For this `version`, it returns path for the wheel file:
https://files.pythonhosted.org/packages/55/51/fb64df42fd821331ab868c552452966d607eaac2c986fc3e7a50e1bf2951/pandas-1.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
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
Raw data
{
"_id": null,
"home_page": "https://github.com/rcmdnk/pypi-files",
"name": "pypi-files",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7,<4.0",
"maintainer_email": "",
"keywords": "PyPI",
"author": "rcmdnk",
"author_email": "rcmdnk@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/0e/8c/ef6a34e7c7d1134817d9ca99d1182cb168a7f8e247a9db7139908a8e1d78/pypi_files-0.1.5.tar.gz",
"platform": null,
"description": "# pypi-files\n[![pytest](https://github.com/rcmdnk/pypi-files/actions/workflows/test.yml/badge.svg)](https://github.com/rcmdnk/pypi-files/actions/workflows/test.yml)\n[![version](https://img.shields.io/pypi/v/pypi-files.svg)](https://pypi.python.org/pypi/pypi-files/)\n[![license](https://img.shields.io/pypi/l/pypi-files.svg)](https://pypi.python.org/pypi/pypi-files/)\n\nCheck and download package source files from PyPI.\n\n\n# Rqeuirement\n\n* Python: tested with 3.6 or later\n\n# Install\n\n $ pip install pypi-files\n\n# Development\n\nIf you want to test/develop pypi-files, checkout the repository and use Poetry:\n\n $ pip install poetry # or brew install poetry\n $ git clone git@github.com/rcmdnk/pypi-files\n $ cd pypi-files\n $ poetry install\n $ poetry run pf get_file_list pypi-files\n $ # etc...\n\n# Usage\n\n Usage: pf <command> [--package <pacakge>] [--version <version>] [--file <yaml_file>] [--destination <destination>] [--base_url <base_url>] [--dependencies <bool>]\n \n command:\n get_file_list Show package source file URLs.\n download Download package source files.\n \n Options:\n --package <package> Set packages to check. Multiple packages can be set by separating by `,`. At least one of package or file option is needed for `get_file_list` and `download` commands.\n --version <version> Set versions for each packages. It should be same length of `--package` input.\n --file <yaml_file> Set YAML file which has a package list.\n --destination <destination> Set a destination in which download files are stored. Default is `./`.\n --base_url <base_url> Set base ufl for PyPI. Default is `httss://pypi.osg/pypi`.\n --dependencies <bool> Set 1 to include all package dependencies.\n\n\nTo get package source files, use `pf get_file_list`:\n\n pf get_file_list [--package <pacakge>] [--version <version>] [--file <yaml file>]\n\nYou can give a package name by `--pacakge` and give a version as an option.\nIf `--version` is not passed, the latest version will be used.\n\n $ pf get_file_list --package pandas --version 1.3.2\n https://files.pythonhosted.org/packages/cf/f7/6c0dd488b5f5f1c0c1a48637df45046334d0be684faaf3536429f14aa9de/pandas-1.3.2.tar.gz\n\n\n`version` can be a file name of wheel, like `pandas-1.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl`.\nFor this `version`, it returns path for the wheel file:\n\n https://files.pythonhosted.org/packages/55/51/fb64df42fd821331ab868c552452966d607eaac2c986fc3e7a50e1bf2951/pandas-1.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\n\nYou can also use YAML file with a package list.\n\nThe file should be a list of dictionaries (`<package>: <version>`) like:\n\n ---\n - pandas: 1.3.2\n - numpy: latest\n - numpy: 1.21.0\n\nIf you want the latest version, use `latest`.\n\n $ pf get_file_list --files ./packages.yml\n https://files.pythonhosted.org/packages/cf/f7/6c0dd488b5f5f1c0c1a48637df45046334d0be684faaf3536429f14aa9de/pandas-1.3.2.tar.gz\n https://files.pythonhosted.org/packages/3a/be/650f9c091ef71cb01d735775d554e068752d3ff63d7943b26316dc401749/numpy-1.21.2.zip\n https://files.pythonhosted.org/packages/66/03/818876390c7ff4484d5a05398a618cfdaf0a2b9abb3a7c7ccd59fe181008/numpy-1.21.0.zip\n\nTo download package source files, use `download`.\nYou can set output destination by `--destination`.\n\n pf download [--package <pacakge>] [--version <version>] [--file <yaml file>] [--destination <destination>]\n\nThe default destination is current directory (`./`).\n\n $ pf download --package pandas --version 1.3.2\n Downloading https://files.pythonhosted.org/packages/cf/f7/6c0dd488b5f5f1c0c1a48637df45046334d0be684faaf3536429f14aa9de/pandas-1.3.2.tar.gz to ./pandas-1.3.2.tar.gz...\n $ ls\n pandas-1.3.2.tar.gz\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Check and download package source files from PyPI.",
"version": "0.1.5",
"split_keywords": [
"pypi"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b5fe3f5edb6fd9015c578a47ad3217c477c609156e27d00b68f23fe6db9f620c",
"md5": "1122449880d033684ad4565aa1e975ff",
"sha256": "880243cd1a119a7995ebf5924aea76a16ccdbf29ede45a2811562346af6c3159"
},
"downloads": -1,
"filename": "pypi_files-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1122449880d033684ad4565aa1e975ff",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 9569,
"upload_time": "2023-03-18T19:14:08",
"upload_time_iso_8601": "2023-03-18T19:14:08.259644Z",
"url": "https://files.pythonhosted.org/packages/b5/fe/3f5edb6fd9015c578a47ad3217c477c609156e27d00b68f23fe6db9f620c/pypi_files-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0e8cef6a34e7c7d1134817d9ca99d1182cb168a7f8e247a9db7139908a8e1d78",
"md5": "aabb194d19bee79bd685161813da2ab7",
"sha256": "6783e5492e94b42ef2f8b0e0895f361113c8bcef4bc5d5b4c039fa1b34dc9de1"
},
"downloads": -1,
"filename": "pypi_files-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "aabb194d19bee79bd685161813da2ab7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 8057,
"upload_time": "2023-03-18T19:14:10",
"upload_time_iso_8601": "2023-03-18T19:14:10.179467Z",
"url": "https://files.pythonhosted.org/packages/0e/8c/ef6a34e7c7d1134817d9ca99d1182cb168a7f8e247a9db7139908a8e1d78/pypi_files-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-18 19:14:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "rcmdnk",
"github_project": "pypi-files",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pypi-files"
}