问题
( Apologies for an issue with the initial title of this question due to a copy paste issue)
On pypi.org I can search for packages by relevance or by "Date last updated"
What I'd really like to search for is by relevance and "Date last update" less than (for example) a year ago.
As the web frontend doesn't provide this I thought about writing a small script doing this for me.
Basic idea: - call pip search "name" - parse the output and get via an api the last changed date and filter if too old - try to find a way to determine the relevance (perhaps just with https://pypi.org/search/?q=searchword )
cross both results.
So does anybody know how to get the last change date on pypi.org for a given python package (or list of packages)?
回答1:
You're looking for JSON API. Projects don't have last modification date but releases have upload timestamp. So it's
json["releases"][version][package_index]["upload_time"]
来源:https://stackoverflow.com/questions/61786395/get-last-update-of-a-pip-package-programatically