PEPs API
在 https://peps.pythonlang.cn/api/peps.json 可以找到一份只读的 JSON 文档,其中包含了所有已发布的 PEP。
每个 PEP 都以一个 JSON 对象表示,以 PEP 编号作为键。每个 JSON 对象的结构如下:
{
"<PEP number>": {
"number": integer, // always identical to <PEP number>
"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 | null,
"resolution": string | null,
"requires": string | null,
"replaces": string | null,
"superseded_by": string | null,
"author_names": Array<string>,
"url": string
},
}
日期值格式为 DD-MMM-YYYY,多个日期以逗号分隔的列表形式组合。
此处显示了一些示例 PEP,说明了每个字段可能的值。
{
"12": {
"number": 12,
"title": "Sample reStructuredText PEP Template",
"authors": "David Goodger, Barry Warsaw, Brett Cannon",
"discussions_to": null,
"status": "Active",
"type": "Process",
"topic": "",
"created": "05-Aug-2002",
"python_version": null,
"post_history": "`30-Aug-2002 <https://mail.python.org/archives/list/python-dev@python.org/thread/KX3AS7QAY26QH3WIUAEOCCNXQ4V2TGGV/>`__",
"resolution": null,
"requires": null,
"replaces": null,
"superseded_by": null,
"author_names": [
"David Goodger",
"Barry Warsaw",
"Brett Cannon"
],
"url": "https://peps.pythonlang.cn/pep-0012/"
},
"160": {
"number": 160,
"title": "Python 1.6 Release Schedule",
"authors": "Fred L. Drake, Jr.",
"discussions_to": null,
"status": "Final",
"type": "Informational",
"topic": "release",
"created": "25-Jul-2000",
"python_version": "1.6",
"post_history": null,
"resolution": null,
"requires": null,
"replaces": null,
"superseded_by": null,
"author_names": [
"Fred L. Drake, Jr."
],
"url": "https://peps.pythonlang.cn/pep-0160/"
},
"3124": {
"number": 3124,
"title": "Overloading, Generic Functions, Interfaces, and Adaptation",
"authors": "Phillip J. Eby",
"discussions_to": "python-3000@python.org",
"status": "Deferred",
"type": "Standards Track",
"topic": "",
"created": "28-Apr-2007",
"python_version": null,
"post_history": "30-Apr-2007",
"resolution": null,
"requires": "3107, 3115, 3119",
"replaces": "245, 246",
"superseded_by": null,
"author_names": [
"Phillip J. Eby"
],
"url": "https://peps.pythonlang.cn/pep-3124/"
}
}