Search code examples
pythonpackagesearchpypi

What is an elegant way to find versions of packages on a pypi package index?


Currently I'm using a very ugly approach based on a regex for finding links and taking them apart.

I'm unhappy with the code, so I'm asking for nicer solutions, preferably using only the stdlib.

Edit

The task at hand has 2 parts:

  1. Find all distributions that match a certain criteria (like prefix of the name).
  2. Find all versions available in each found distribution.

The expected result is a mapping of distribution -> versions -> files.


Solution

  • its unfortunate, but due to the lack of xmlrpc on other indexes i need to keep my solution