@@ -4,11 +4,11 @@ Author: Donald Stufft <donald@stufft.io>,
4
4
Pradyun Gedam <pradyunsg@gmail.com>,
5
5
Cooper Lees <me@cooperlees.com>,
6
6
Dustin Ingram <di@python.org>
7
+ PEP-Delegate: Brett Cannon <brett@python.org>
8
+ Discussions-To: https://discuss.python.org/t/pep-691-json-based-simple-api-for-python-package-indexes/15553
7
9
Status: Draft
8
10
Type: Standards Track
9
11
Content-Type: text/x-rst
10
- PEP-Delegate: Brett Cannon <brett@python.org>
11
- Discussions-To: https://discuss.python.org/t/pep-691-json-based-simple-api-for-python-package-indexes/15553
12
12
Created: 04-May-2022
13
13
Post-History: `05-May-2022 <https://discuss.python.org/t/pep-691-json-based-simple-api-for-python-package-indexes/15553 >`__
14
14
@@ -290,9 +290,11 @@ This PEP proposes that all responses from the Simple API will have a standard
290
290
content type that describes what the response is (a Simple API response), what
291
291
version of the API it represents, and what serialization format has been used.
292
292
293
- The structure of this content type will be::
293
+ The structure of this content type will be:
294
+
295
+ .. code-block :: text
294
296
295
- application/vnd.pypi.simple.$version+format
297
+ application/vnd.pypi.simple.$version+format
296
298
297
299
Since only major versions should be disruptive to clients attempting to
298
300
understand one of these API responses, only the major version will be included
@@ -403,7 +405,7 @@ so the risks for actual breakages is low.
403
405
404
406
An example of how a client can operate would look like:
405
407
406
- .. code-block :: python3
408
+ .. code-block :: python
407
409
408
410
import cgi
409
411
import requests
@@ -839,10 +841,10 @@ how they use the Simple + JSON APIs today:
839
841
- List of all files for a particular release
840
842
- Metadata of each individual artifact:
841
843
842
- - was it yanked? (`data-yanked `)
843
- - what's the python-requires? (`data-python-requires `)
844
+ - was it yanked? (`` data-yanked ` `)
845
+ - what's the python-requires? (`` data-python-requires ` `)
844
846
- what's the hash of this file? (currently, hash in URL)
845
- - Full metadata (`data-dist-info-metadata `)
847
+ - Full metadata (`` data-dist-info-metadata ` `)
846
848
- [Bonus] what are the declared dependencies, if available (list-of-strings, null if unavailable)?
847
849
848
850
- ``bandersnatch `` - Only uses legacy JSON API + XMLRPC today:
@@ -859,11 +861,12 @@ how they use the Simple + JSON APIs today:
859
861
860
862
- Write out the JSON to mirror storage today (disk/S3)
861
863
862
- - Required metadata used (via Package class - https://github.com/pypa/bandersnatch/blob/main/src/bandersnatch/package.py):
864
+ - Required metadata used
865
+ (via `Package class <https://github.com/pypa/bandersnatch/blob/main/src/bandersnatch/package.py >`__):
863
866
864
- - metadata["info"]
865
- - metadata["last_serial"]
866
- - metadata["releases"]
867
+ - `` metadata["info"] ``
868
+ - `` metadata["last_serial"] ``
869
+ - `` metadata["releases"] ``
867
870
868
871
- digests
869
872
- URL
0 commit comments