Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new JSON API Endpoints for new proposed PEP #8521

Open
cooperlees opened this issue Sep 5, 2020 · 4 comments
Open

Implement new JSON API Endpoints for new proposed PEP #8521

cooperlees opened this issue Sep 5, 2020 · 4 comments

Comments

@cooperlees
Copy link
Contributor

cooperlees commented Sep 5, 2020

What's the problem this feature will solve?
We're trying to make the JSON API documented in a PEP and more portable for alternate Package Index servers to implement a JSON API for each index.
e.g. devpi
This will allow:

Describe the solution you'd like
Add a new /json endpoint to pypi.org
As per PEP: https://github.com/cooperlees/peps/blob/warehouse_json_api/pep-9999.rst#api-urls
(will update URL as we progress)

Additional context
Draft PEP: https://github.com/cooperlees/peps/blob/warehouse_json_api/pep-9999.rst
PEP Issue: pypa/packaging-problems#367

@di
Copy link
Member

di commented Nov 6, 2022

@cooperlees Can this be closed now that we have PEP 691?

@cooperlees
Copy link
Contributor Author

PEP691 is not really a 1:1 replacement. Users still use the JSON API for where PEP691 does not offer the metadata they need. So I still argue this is valid and a need to truly mirror all of PyPI in a way that allows mirrors to also have complete separate indexes.

We still don't have a standardized way to house different "JSON APIs" on a mirror via one mirror endpoint. We can say it's not a goal. I unfortunately don't ever see a compromise happening here. I've asked for so long that I've given up.

@di
Copy link
Member

di commented Nov 6, 2022

In that case do you think we can close this in favor of #12488? Or should this stay open to discuss support for "complete separate indexes" in addition to that?

@cooperlees
Copy link
Contributor Author

I feel they ask for different but similar things. #12488 wants an easier API for getting changed since XML RPC calls basically and this wants the ability to make the API route/endpoint/path cleaner so multiple indexes can have their own respective "JSON API".

We need to decide if this should or will ever happen, I doubt it will, so we should probably just close and say we're going to focus on extending the Simple API like PEP 691 or make a new API. The /pypi/PKG_NAME/json route could also be left and new indexes just can't be called "pypi" which is probably a good idea anyways. Then mirroring could just use /$index_name/$pkg_name/json ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants