Reputation: 2114
I want to write a script which goes through all the packages on pypi repository, to check whether they are using wheel
or egg
.
I know that by the new standard, it is mandatory for all the packages to use wheel
and not egg
. I found this information on this website. They also have the list of packages which do and don't use wheel
. But, they list only top few packages. But, I would like to check this for all the packages on pypi. I know that on pypi website they show if the types of files available to download e.g. this shows that there is no wheel file type is available to download, on the contrary this shows that the wheel format is available to download. Does something like this help me in achieving my goal?
I certainly don't expect someone to write a script for me, but I would like a hint on how to figure if the package is using wheel
.
Upvotes: 7
Views: 5148
Reputation: 21530
PyPI has a JSON API which will give you all the releases for a given project, and all the files for a given release: https://warehouse.readthedocs.io/api-reference/json/
Upvotes: 6
Reputation: 583
PIP, by default, uses the Simple PyPi Repository.
If you open the link, you can see that it has a link for every single available package.
If you open a package link, you can see different packages, versions, and download options available.
Obviously, you'll have to test for edge cases, but I should think checking if the latest version has a .whl
extension should be a good starting place.
Upvotes: 2
Reputation: 22982
You can use pip download
to download the required library, and then check if it is a wheel file or something else. But, that way, you only check the libraries available for your own distribution/OS and Python version. There may be variants…
Upvotes: 1