Sphinx AutoAPI is a Sphinx extension that automatically generates API documentation by statically analyzing Python source code using the astroid library, without importing or executing the documented code. It reads Python files and .pyi stubs, builds an internal object model (modules, classes, functions, etc.), applies configurable filtering options (e.g., private members, inherited members), and renders the documentation as RST via Jinja templates. The extension also provides autodoc-style directives (e.g., autoapifunction, autoapimethod) that allow manual documentation entries backed by the same static analysis, and supports inheritance diagrams, type annotation rendering, PEP-695 type parameters, overloaded signatures, and integration with Sphinx's viewcode. Its architecture separates parsing (astroid-based), mapping (object creation and option evaluation), and output (template rendering), making the core logic reusable in other static analysis tools.
This repository is the official source for Python Enhancement Proposals (PEPs), the design documents that guide the evolution of the Python language, standard library, packaging, and governance. It is primarily a documentation and standards repository, but it includes a sophisticated Sphinx-based build system (pep_sphinx_extensions) that renders PEPs from reStructuredText to HTML, generates a PEP index (PEP 0), produces JSON APIs for PEP metadata and release schedules, and creates an RSS feed and iCalendar file. The repository also contains release management automation (release_management module) that reads a TOML configuration and updates release schedule sections in PEPs, serializes to JSON/ICS, and integrates with CI/CD pipelines (GitHub Actions) for linting, testing, and deployment to peps.python.org via Fastly CDN. While the vast majority of files are PEP documents (.rst), the core value for reuse lies in the custom Sphinx extensions, the PEP index generator, the release management data model, and the linting framework. The repository is actively maintained with modern tooling (pre-commit, ruff, codespell) and demonstrates strong engineering practices for a documentation-centric project.