Skip to content

Commit d72de34

Browse files
committed
Refresh api/index
1 parent e99d6ef commit d72de34

File tree

1 file changed

+50
-40
lines changed

1 file changed

+50
-40
lines changed

peps/api/index.rst

Lines changed: 50 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
PEPs API
22
========
33

4-
There is a read-only API of published PEPs available at:
4+
There is a read-only JSON document of every published PEP available at
5+
https://peps.python.org/api/peps.json or https://peps.python.org/peps.json
6+
(both URLs point to the same document).
57

6-
* https://peps.python.org/api/peps.json
8+
Each PEP is represented as a JSON object, keyed by the PEP number.
9+
The structure of each JSON object is as follows:
710

8-
The structure is like:
9-
10-
.. code-block:: javascript
11+
.. code-block:: typescript
1112
1213
{
1314
"<PEP number>": {
14-
"number": integer,
15+
"number": integer, // always identical to <PEP number>
1516
"title": string,
16-
"authors": string,
17+
"authors": Array<string>,
1718
"discussions_to": string | null,
1819
"status": "Accepted" | "Active" | "Deferred" | "Draft" | "Final" | "Provisional" | "Rejected" | "Superseded" | "Withdrawn",
1920
"type": "Informational" | "Process" | "Standards Track",
@@ -32,60 +33,69 @@ The structure is like:
3233
Date values are formatted as DD-MMM-YYYY,
3334
and multiple dates are combined in a comma-separated list.
3435

35-
For example:
36+
A selection of example PEPs are shown here,
37+
illustrating some of the possible values for each field:
3638

3739
.. code-block:: json
3840
3941
{
40-
"8": {
41-
"number": 8,
42-
"title": "Style Guide for Python Code",
43-
"authors": "Guido van Rossum, Barry Warsaw, Alyssa Coghlan",
42+
"12": {
43+
"number": 12,
44+
"title": "Sample reStructuredText PEP Template",
45+
"authors": [
46+
"David Goodger",
47+
"Barry Warsaw",
48+
"Brett Cannon"
49+
],
4450
"discussions_to": null,
4551
"status": "Active",
4652
"type": "Process",
4753
"topic": "",
48-
"created": "05-Jul-2001",
54+
"created": "05-Aug-2002",
4955
"python_version": null,
50-
"post_history": "05-Jul-2001, 01-Aug-2013",
56+
"post_history": "`30-Aug-2002 <https://mail.python.org/archives/list/python-dev@python.org/thread/KX3AS7QAY26QH3WIUAEOCCNXQ4V2TGGV/>`__",
5157
"resolution": null,
5258
"requires": null,
5359
"replaces": null,
5460
"superseded_by": null,
55-
"url": "https://peps.python.org/pep-0008/"
61+
"url": "https://peps.python.org/pep-0012/"
5662
},
57-
"484": {
58-
"number": 484,
59-
"title": "Type Hints",
60-
"authors": "Guido van Rossum, Jukka Lehtosalo, Łukasz Langa",
61-
"discussions_to": "python-dev@python.org",
63+
"160": {
64+
"number": 160,
65+
"title": "Python 1.6 Release Schedule",
66+
"authors": [
67+
"Fred L. Drake, Jr."
68+
],
69+
"discussions_to": null,
6270
"status": "Final",
63-
"type": "Standards Track",
64-
"topic": "typing",
65-
"created": "29-Sep-2014",
66-
"python_version": "3.5",
67-
"post_history": "16-Jan-2015, 20-Mar-2015, 17-Apr-2015, 20-May-2015, 22-May-2015",
68-
"resolution": "https://mail.python.org/pipermail/python-dev/2015-May/140104.html",
71+
"type": "Informational",
72+
"topic": "release",
73+
"created": "25-Jul-2000",
74+
"python_version": "1.6",
75+
"post_history": null,
76+
"resolution": null,
6977
"requires": null,
7078
"replaces": null,
7179
"superseded_by": null,
72-
"url": "https://peps.python.org/pep-0484/"
80+
"url": "https://peps.python.org/pep-0160/"
7381
},
74-
"622": {
75-
"number": 622,
76-
"title": "Structural Pattern Matching",
77-
"authors": "Brandt Bucher, Daniel F Moisset, Tobias Kohn, Ivan Levkivskyi, Guido van Rossum, Talin",
78-
"discussions_to": "python-dev@python.org",
79-
"status": "Superseded",
82+
"3124": {
83+
"number": 3124,
84+
"title": "Overloading, Generic Functions, Interfaces, and Adaptation",
85+
"authors": [
86+
"Phillip J. Eby"
87+
],
88+
"discussions_to": "python-3000@python.org",
89+
"status": "Deferred",
8090
"type": "Standards Track",
8191
"topic": "",
82-
"created": "23-Jun-2020",
83-
"python_version": "3.10",
84-
"post_history": "23-Jun-2020, 08-Jul-2020",
92+
"created": "28-Apr-2007",
93+
"python_version": null,
94+
"post_history": "30-Apr-2007",
8595
"resolution": null,
86-
"requires": null,
87-
"replaces": null,
88-
"superseded_by": "634",
89-
"url": "https://peps.python.org/pep-0622/"
96+
"requires": "3107, 3115, 3119",
97+
"replaces": "245, 246",
98+
"superseded_by": null,
99+
"url": "https://peps.python.org/pep-3124/"
90100
}
91101
}

0 commit comments

Comments
 (0)