Created
September 15, 2020 01:04
-
-
Save iizukak/cdbdb1a5ddd5b306fbe051b568d642ca to your computer and use it in GitHub Desktop.
genosslist.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import csv | |
import requests | |
with open("./requirements.txt") as f: | |
osslist = [s.strip() for s in f.readlines()] | |
for oss in osslist: | |
name, var = oss.split("==") | |
url = "https://pypi.org/pypi/{0}/{1}/json".format(name, var) | |
json = requests.get(url).json() | |
print(json["info"]["name"] + "," + | |
json["info"]["version"] + "," + | |
json["info"]["home_page"] + "," + | |
json["info"]["license"] + "," + | |
json["info"]["license"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment