Demonstrates how to use pypi_simple to parse and manipulate PyPI wheel package metadata.
It takes quite some effort to figure out if a wheel is compatible with your system (platform_tag) and your Python version (python_tag), not to mention other features such as abi-tag, yanked status etc.. All in all, this points at a need for a high-level interface for package resolving with pip. (e.g. pip-tools, poetry, pip/wheel itself)
Stdout as of 2020-02-04:
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): pypi.org:443
DEBUG:urllib3.connectionpool:https://pypi.org:443 "GET /simple/matplotlib/ HTTP/1.1" 200 58154
Choose 3.1.3: matplotlib-3.1.3-cp38-cp38-manylinux1_x86_64.whl
DEBUG:__main__:Found 101 versions for "matplotlib":
1.5.2
1.5.2
1.5.3
1.5.3
1.5.3
1.5.3
2.0.0b1
2.0.0b1
2.0.0b1
2.0.0b1
2.0.0b2
2.0.0b2
2.0.0b3
2.0.0b3
2.0.0b4
2.0.0b4
2.0.0rc1
2.0.0rc1
2.0.0rc2
2.0.0rc2
2.0.0
2.0.0
2.0.0
2.0.0
2.0.0
2.0.0
2.0.1
2.0.1
2.0.1
2.0.2
2.0.2
2.0.2
2.1.0rc1
2.1.0rc1
2.1.0rc1
2.1.0
2.1.0
2.1.0
2.1.1
2.1.1
2.1.1
2.1.2
2.1.2
2.1.2
2.2.0rc1
2.2.0rc1
2.2.0rc1
2.2.0
2.2.0
2.2.0
2.2.2
2.2.2
2.2.2
2.2.2
2.2.3
2.2.3
2.2.3
2.2.3
2.2.4
2.2.4
2.2.4
2.2.4
2.2.5
2.2.5
2.2.5
2.2.5
3.0.0rc2
3.0.0rc2
3.0.0rc2
3.0.0
3.0.0
3.0.0
3.0.1
3.0.1
3.0.1
3.0.2
3.0.2
3.0.2
3.0.3
3.0.3
3.0.3
3.1.0rc1
3.1.0rc1
3.1.0rc2
3.1.0rc2
3.1.0
3.1.0
3.1.1
3.1.1
3.1.2
3.1.2
3.1.2
3.1.3
3.1.3
3.1.3
3.2.0rc1
3.2.0rc1
3.2.0rc1
3.2.0rc3
3.2.0rc3
3.2.0rc3
Process finished with exit code 0