Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! Document the PEPs API
  • Loading branch information
hugovk committed Jul 14, 2024
commit 937678823246e3f7e8664b48936a6786629376f8
7 changes: 7 additions & 0 deletions pep_sphinx_extensions/pep_zero_generator/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,13 @@ def write_pep0(
self.emit_newline()
self.emit_newline()

self.emit_title("API")
self.emit_text(
"The `PEPS API <api/peps.json>`__ is a JSON file of metadata about "
"all the published PEPs. :doc:`Read more here <api/index>`."
)
self.emit_newline()

# PEPs by category
self.emit_title("Index by Category")
meta, info, provisional, accepted, open_, finished, historical, deferred, dead = _classify_peps(peps)
Expand Down
64 changes: 64 additions & 0 deletions peps/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
PEPs API
========

There is a read-only API of published PEPs available at:

* https://peps.python.org/api/peps.json

The structure is like:

.. code-block:: json

{
"0": {
"number": 0,
"title": "Index of Python Enhancement Proposals (PEPs)",
"authors": "The PEP Editors",
"discussions_to": null,
"status": "Active",
"type": "Informational",
"topic": "",
"created": "13-Jul-2000",
"python_version": null,
"post_history": null,
"resolution": null,
"requires": null,
"replaces": null,
"superseded_by": null,
"url": "https://peps.python.org/pep-0000/"
},
"1": {
"number": 1,
"title": "PEP Purpose and Guidelines",
"authors": "Barry Warsaw, Jeremy Hylton, David Goodger, Alyssa Coghlan",
"discussions_to": null,
"status": "Active",
"type": "Process",
"topic": "",
"created": "13-Jun-2000",
"python_version": null,
"post_history": "21-Mar-2001, 29-Jul-2002, 03-May-2003, 05-May-2012, 07-Apr-2013",
"resolution": null,
"requires": null,
"replaces": null,
"superseded_by": null,
"url": "https://peps.python.org/pep-0001/"
},
"2": {
"number": 2,
"title": "Procedure for Adding New Modules",
"authors": "Brett Cannon, Martijn Faassen",
"discussions_to": null,
"status": "Active",
"type": "Process",
"topic": "",
"created": "07-Jul-2001",
"python_version": null,
"post_history": "07-Jul-2001, 09-Mar-2002",
"resolution": null,
"requires": null,
"replaces": null,
"superseded_by": null,
"url": "https://peps.python.org/pep-0002/"
}
}