Stable PyPI URL? (or “Where in the World is yamlcore?”)

As a packager of Python packages for a large Linux distro (openSUSE), I rely heavily on the stable URLs on PyPI in the form https://files.pythonhosted.org/packages/{first-letter}/{name}/{name}-{version}.tar.gz. Is this alias still supported? The Web interface uses some unexpectable like https://files.pythonhosted.org/packages/eb/d4/113dfc4c85f945de13b045a20eca50be5f6efa33342d9a9bd6162d26b288/yamlcore-0.0.4.tar.gz, whereas I would like to use https://files.pythonhosted.org/packages/y/yamlcore/yamlcore-0.0.4.tar.gz, which however gives me just 404.

Any idea what do I do wrong?

Integration guide - Warehouse documentation covers the options for determining file download URLs.

Your best bet is to query the JSON API, but a helper does exist with some caveats. Namely that the file name portion of the URL must be exact (capitalization, underscores/hypens, etc…).

4 Likes

source distributions are found under /source/, i.e.:
https://files.pythonhosted.org/packages/source/y/yamlcore/yamlcore-0.0.4.tar.gz
wheels are under the python tag:
https://files.pythonhosted.org/packages/py3/y/yamlcore/yamlcore-0.0.4-py3-none-any.whl

Oh, lovely, sed change in the couple of thousand packages!