Skip to main content

A wrapper for pip download in offline scenario.

Project description

pip-download: A wrapper useful in offline scenario

简体中文

pip-download is a tool which can be used to download python projects and their dependencies listed on pypi's download files page. If you run the pip-download command to download one project on a Linux platform, packages end with .whl and can be directly installed on a Windows and a macOS platform will also be downloaded. In that way, you can use these downloaded packages to serve for a minimal pypi sever(like pypiserver ) on your company internal network.

At first, it uses pip download xxx command to download packages of the project xxx to a temp dir. Then it unpacks these downloaded packages' name and version to download all packages of the project xxx. These downloaded packages include packages end with .whl built on the Linux, Windows, macOS platform and the source packages end with .tar.gz or .zip .

Installation

pip-download is distributed on PyPI and is available on Linux/macOS and Windows and supports Python 3.6+. You can simply install pip-download as below:

$ pip install pip-download

However, it's a better choice to use a virtual environment:

$ python -m venv venv
# On Windows:
$ .\venv\Scripts\activate
# On Linux:
$ source venv/bin/activate
$ pip install pip-download

virtualenv is also a good choice.

Usage

After installation, you can use pip-download to download python projects and its dependencies.

$ pip-download flask
$ pip-download -r requirements.txt
$ pip-download hatch -d /tmp/
$ pip-dwonload -py cp37 ujson
$ pip-dwonload -py cp37 -p win_amd64 ujson

Also, you can put your common options in the config file, python_versions and platform_tags are supported now:

$ pip-download --show-config
/some-path-to/settings.json

$ vim /some-path-to/settings.json
{
    "python-versions": ["cp37"],
    "platform-tags": ["win_amd64"]
}

$ vim /some-path-to/settings.json
{
    "python-versions": ["cp37", "cp36"],
    "platform-tags": ["win_amd64", "manylinux"]
}

For more usage, use pip-download --help.

Credits

  • All the people who work on Click
  • All the people involved in the project hatch

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pip-download, version 0.4.2
Filename, size File type Python version Upload date Hashes
Filename, size pip_download-0.4.2-py3-none-any.whl (14.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pip-download-0.4.2.tar.gz (11.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page