You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is there a supported API/method for getting a list of PEP numbers and their titles? #2583
I have an app which lists all the PEP numbers and their descriptions. I had been scraping the PEP index, as that was the only way I could find in the past. But recent changes to the PEP rendering broke my scraper, and I feel like it's probably not a good idea to simply fix it and move on - I'd rather find something more reliable.
Is there any web API, or just a URL pointing to a document with a stable structure, that lets me get a list like I describe? I can't fetch the PEP index from this repo, because it's built on demand, and the nature of the application where I need the data means I can only realistically do a URL fetch (grabbing the repo and doing a build isn't feasible).
https://peps.python.org/api/peps.json exists. It's considered "experimental" but it does provide all the PEP metadata/information. With PEP 8, for example:
Activity
pradyunsg commentedon May 7, 2022
https://peps.python.org/api/peps.json exists. It's considered "experimental" but it does provide all the PEP metadata/information. With PEP 8, for example:
pradyunsg commentedon May 7, 2022
It only provides the headers though, and not the contents of each of the rendered PEPs.
pfmoore commentedon May 7, 2022
Awesome! That provides everything I need, thanks 🙂
pradyunsg commentedon May 7, 2022
Neato, closing since I reckon this is resolved. :)
AA-Turner commentedon May 7, 2022
xref #2584 for documenting the file.
A