Given a PyPI package, source_finder.py looks for the source repository in its metadata.
$ python source_finder.py six
https://github.com/benjaminp/six
$ python source_finder.py urllib3
None
It caches the JSON metadata downloaded from PyPI in a temporary directory, use the --verbose option to see where. The cache files will be deleted the next month.
This will look for the source repo for the top-5,000 most-downloaded packages, using a JSON file from Top PyPI Packages, and save them to data/top-repos.json.
source_finder.py
Given a PyPI package,
source_finder.py
looks for the source repository in its metadata.It caches the JSON metadata downloaded from PyPI in a temporary directory, use the
--verbose
option to see where. The cache files will be deleted the next month.top_repos.py
This will look for the source repo for the top-5,000 most-downloaded packages, using a JSON file from Top PyPI Packages, and save them to
data/top-repos.json
.First, fetch fresh copy of the top packages:
Check the first 10 packages:
When running again:
Currently, it finds 3,951 repos for the top 5,000 packages.
I'm not planning on automating this, but can run it from time to time to update it.