jwodder / pypi-simple

PyPI Simple Repository API client library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add upload time to package info

richaagarwal opened this issue · comments

It looks like there's no upload time currently provided in a DistributionPackage (https://pypi-simple.readthedocs.io/en/stable/high-level-api.html#pypi_simple.DistributionPackage)

Are there plans to add this? I know that the releases endpoint in the PyPI JSON API may be removed in the future (according to https://warehouse.pypa.io/api-reference/json.html, and discussion in pypi/warehouse#11775), so it would be great to have the data currently available at that endpoint (as upload_time) available via this API.

At the moment, upload time is only provided by the JSON API, not the Simple API, which is the only API that this package supports. (Note: When I say "the JSON API", I mean the one documented at https://warehouse.pypa.io/api-reference/json.html, not to be confused with the JSON representation of the Simple API.)

However, there is a proposal to add this information to the Simple API (but only to its JSON representation); should that get accepted & implemented in Warehouse, I will add support for it to this package.

PEP 700 has been accepted, and I've just released pypi-simple v1.1.0, which adds the upload_time field to DistributionPackage. However, Warehouse has yet to provide this field for any packages; see pypi/warehouse#12727 for progress on that.