Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1.7k
Meta: Document the PEPs API#3864
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
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
9 commits Select commit Hold shift + click to select a range
8e5eba6 Document the PEPs API
hugovk 74d5214 Format conf.py with Black
hugovk 2b110f3 fixup! Document the PEPs API
hugovk 9376788 fixup! Document the PEPs API
hugovk 8a4e1cc Revert "fixup! Document the PEPs API"
hugovk 7cf4fa5 Use PEPs 8, 484 and 622 as representative examples
hugovk 94daba8 Add a pseudo-schema
hugovk d3d3075 Add missing bracket, fix typo
hugovk d393bbc Mark pseudo-JSON as JavaScript so it can be parsed by Sphinx
hugovk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| 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:: javascript | ||
| { | ||
| "<PEP number>":{ | ||
| "number": integer, | ||
| "title": string, | ||
| "authors": string, | ||
| "discussions_to": string | null, | ||
| "status": "Accepted" | "Active" | "Deferred" | "Draft" | "Final" | "Provisional" | "Rejected" | "Superseded" | "Withdrawn", | ||
| "type": "Informational" | "Process" | "Standards Track", | ||
| "topic": "governance" | "packaging" | "release" | "typing" | "", | ||
| "created": string, | ||
| "python_version": string | null, | ||
| "post_history": string, | ||
| "resolution": string | null, | ||
| "requires": string | null, | ||
| "replaces": string | null, | ||
| "superseded_by": string | null, | ||
| "url": string | ||
| }, | ||
| } | ||
| Date values are formatted as DD-MMM-YYYY, | ||
| and multiple dates are combined in a comma-separated list. | ||
| For example: | ||
| .. code-block:: json | ||
| { | ||
| "8":{ | ||
| "number": 8, | ||
| "title": "Style Guide for Python Code", | ||
| "authors": "Guido van Rossum, Barry Warsaw, Alyssa Coghlan", | ||
| "discussions_to": null, | ||
| "status": "Active", | ||
| "type": "Process", | ||
| "topic": "", | ||
| "created": "05-Jul-2001", | ||
| "python_version": null, | ||
| "post_history": "05-Jul-2001, 01-Aug-2013", | ||
| "resolution": null, | ||
| "requires": null, | ||
| "replaces": null, | ||
| "superseded_by": null, | ||
| "url": "https://peps.python.org/pep-0008/" | ||
| }, | ||
| "484":{ | ||
| "number": 484, | ||
| "title": "Type Hints", | ||
| "authors": "Guido van Rossum, Jukka Lehtosalo, Łukasz Langa", | ||
| "discussions_to": "python-dev@python.org", | ||
| "status": "Final", | ||
| "type": "Standards Track", | ||
| "topic": "typing", | ||
| "created": "29-Sep-2014", | ||
| "python_version": "3.5", | ||
| "post_history": "16-Jan-2015, 20-Mar-2015, 17-Apr-2015, 20-May-2015, 22-May-2015", | ||
| "resolution": "https://mail.python.org/pipermail/python-dev/2015-May/140104.html", | ||
| "requires": null, | ||
| "replaces": null, | ||
| "superseded_by": null, | ||
| "url": "https://peps.python.org/pep-0484/" | ||
| }, | ||
| "622":{ | ||
| "number": 622, | ||
| "title": "Structural Pattern Matching", | ||
| "authors": "Brandt Bucher, Daniel F Moisset, Tobias Kohn, Ivan Levkivskyi, Guido van Rossum, Talin", | ||
| "discussions_to": "python-dev@python.org", | ||
| "status": "Superseded", | ||
| "type": "Standards Track", | ||
| "topic": "", | ||
| "created": "23-Jun-2020", | ||
| "python_version": "3.10", | ||
| "post_history": "23-Jun-2020, 08-Jul-2020", | ||
| "resolution": null, | ||
| "requires": null, | ||
| "replaces": null, | ||
| "superseded_by": "634", | ||
| "url": "https://peps.python.org/pep-0622/" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -30,17 +30,20 @@ | ||
| ".rst": "pep", | ||
| } | ||
| # List of patterns (relative to source dir) to ignore when looking for source files. | ||
| # List of patterns (relative to source dir) to include when looking for source files. | ||
| include_patterns= [ | ||
| # Required for Sphinx | ||
| "contents.rst", | ||
| # PEP files | ||
| "pep-????.rst", | ||
| # PEP ancillary files | ||
| "pep-????/*.rst", | ||
| # PEPs API | ||
| "api/*.rst", | ||
JelleZijlstra marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading. Please reload this page. | ||
| # Documentation | ||
| "docs/*.rst", | ||
| ] | ||
| # And to ignore when looking for source files. | ||
| exclude_patterns= [ | ||
| # PEP Template | ||
| "pep-0012/pep-NNNN.rst", | ||
| @@ -51,14 +54,14 @@ | ||
| # Intersphinx configuration | ||
| intersphinx_mapping={ | ||
| 'python': ('https://docs.python.org/3/', None), | ||
| 'packaging': ('https://packaging.python.org/en/latest/', None), | ||
| 'typing': ('https://typing.readthedocs.io/en/latest/', None), | ||
| 'trio': ('https://trio.readthedocs.io/en/latest/', None), | ||
| 'devguide': ('https://devguide.python.org/', None), | ||
| 'py3.11': ('https://docs.python.org/3.11/', None), | ||
| 'py3.12': ('https://docs.python.org/3.12/', None), | ||
| 'py3.13': ('https://docs.python.org/3.13/', None), | ||
| "python": ("https://docs.python.org/3/", None), | ||
| "packaging": ("https://packaging.python.org/en/latest/", None), | ||
| "typing": ("https://typing.readthedocs.io/en/latest/", None), | ||
| "trio": ("https://trio.readthedocs.io/en/latest/", None), | ||
| "devguide": ("https://devguide.python.org/", None), | ||
| "py3.11": ("https://docs.python.org/3.11/", None), | ||
| "py3.12": ("https://docs.python.org/3.12/", None), | ||
| "py3.13": ("https://docs.python.org/3.13/", None), | ||
| } | ||
| intersphinx_disabled_reftypes= [] | ||
| @@ -86,4 +89,5 @@ | ||
| html_baseurl="https://peps.python.org"# to create the CNAME file | ||
| gettext_auto_build=False# speed-ups | ||
| templates_path= [os.fspath(_PSE_PATH/"pep_theme"/"templates")] # Theme template relative paths from `confdir` | ||
| # Theme template relative paths from `confdir` | ||
| templates_path= [os.fspath(_PSE_PATH/"pep_theme"/"templates")] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.