Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does PyPI have simple urls for package downloads?

Tags:

python

pypi

Does PyPI support simple download urls? The reason I want to do this, is that I have a PC with curl installed, but not pip. So I would be able to install the package with:

pip install ppci

But since pip is not available, what I want to do is download this package with curl and untar it.

Now I can do this:

curl https://pypi.python.org/packages/4c/e8/fd7241885330ace50d2f7598a2652d4e80c1d922faece7bba88529cf6cfe/ppci-0.5.4.tar.gz
tar xfz ppci-0.5.4.tar.gz

But what I want is a cleaner url, like this:

curl https://pypi.python.org/packages/ppci/0.5.4/ppci-0.5.4.tar.gz

So, that in future I can easily upgrade the version to this:

curl https://pypi.python.org/packages/ppci/0.5.5/ppci-0.5.5.tar.gz

Does this url, or something alike exist, such that I can easily increase the version number and get the newer version without the long hashcode in it?

like image 479
Windel Avatar asked Dec 12 '17 20:12

Windel


People also ask

What is PyPI repository URL?

The Python Package Index, or PyPI, is a vast repository of open-source Python packages supplied by the worldwide community of Python developers. The official index is available at https://pypi.org, and the site itself is maintained by the Python Software Foundation.

How do I download PyPI packages?

Point your browser at https://pypi.org/project/<packagename> Select either Download Files to download the current package version, or Release History to select the version of your choice.

What is PyPI simple?

pypi-simple is a client library for the Python Simple Repository API as specified in PEP 503 and updated by PEP 592, PEP 629, PEP 658, and PEP 691.

What is the difference between PyPI and pip?

pip is the de facto package manager in the Python world. It can install packages from many sources, but PyPI is the primary package source where it's used. When installing packages, pip will first resolve the dependencies, check if they are already installed on the system, and, if not, install them.


1 Answers

The right url is:

https://pypi.io/packages/source/p/ppci/ppci-0.5.4.tar.gz

Note that this url will redirect, but curl can handle it with the -L option.

The url format is, as explained below in the comments:

https://pypi.io/packages/source/{ package_name_first_letter }/{ package_name }/{ package_name }-{ package_version }.tar.gz
like image 153
Windel Avatar answered Nov 16 '22 17:11

Windel