sphinxcontrib-apidoc
A Sphinx extension for running 'sphinx-apidoc' on each build
What it is and what it does
sphinxcontrib-apidoc is a Sphinx extension that integrates sphinx-apidoc into the documentation build process, eliminating the need to run sphinx-apidoc as a separate step before sphinx-build. Instead of configuring API documentation generation in tox.ini or shell scripts, you define settings directly in your Sphinx conf.py file.
The extension accepts configuration options like apidoc_module_dir (the Python package to document), apidoc_output_dir (where to write generated files), apidoc_excluded_paths (modules to skip), and apidoc_separate_modules (whether each module gets its own page). It depends on pbr and Sphinx, supports Python 3.9+, and is actively maintained. However, the project documentation notes that Sphinx now includes a built-in extension with similar functionality, and existing users are encouraged to migrate to that instead.
Use it for:
- Simplify documentation builds by moving sphinx-apidoc configuration from tox.ini into conf.py, reducing build orchestration complexity.
- Automatically generate API reference documentation for Python packages as part of the standard sphinx-build workflow.
- Migrate from pbr's autodoc_tree feature to a standalone Sphinx extension without changing documentation structure.
- Exclude test modules and private code from generated API docs using fnmatch-style path patterns.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Sphinx extension that automatically runs sphinx-apidoc during documentation builds, generating API documentation from Python source code without requiring separate build steps.
Yes, if you are already using Sphinx and want to simplify your documentation build pipeline by integrating sphinx-apidoc directly into conf.py. However, check whether Sphinx's built-in apidoc extension meets your needs first, as the project documentation recommends new users adopt that instead and notes this project will eventually be retired.
Install
sphinxcontrib-apidoc on PyPI
pip
pip install sphinxcontrib-apidocuv
uv add sphinxcontrib-apidocpoetry
poetry add sphinxcontrib-apidocInstalling sphinxcontrib-apidoc
Before you install
Low install friction with only two runtime dependencies (pbr and Sphinx). Repository is active with a recent commit on 2026-06-08 and no known vulnerabilities.
License in practice
BSD License (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install sphinxcontrib-apidoc
# In doc/source/conf.py:
extensions = ['sphinxcontrib.apidoc']
apidoc_module_dir = '../my_code'
apidoc_output_dir = 'reference'
apidoc_excluded_paths = ['tests']
Requires Python 3.9 or later; Sphinx must be installed as a runtime dependency.
Verify before relying
- Whether the built-in Sphinx extension mentioned in the description has feature parity or significant differences that would affect migration decisions.
- Performance characteristics when documenting large codebases with many modules.
Package facts
| License | BSD License (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — pbr, Sphinx |
| Maintenance | actively maintained — 463 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 195,630/month — #9,810 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sphinxcontrib_apidoc-0.6.0-py3-none-any.whl
Keywords: sphinx
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
autodocsummA Sphinx extension that enhances autodoc with…
permissive · top 5,000 on PyPI
sphinx-autoapiSphinx AutoAPI generates complete API…
permissive · top 5,000 on PyPI
sphinxcontrib-djangoA Sphinx extension that enhances autodoc output…
permissive · top 15,000 on PyPI
sphinxcontrib-autoyamlA Sphinx extension that auto-generates…
permissive · top 15,000 on PyPI
sphinx-autodoc2sphinx-autodoc2 generates API documentation for…
permissive · top 15,000 on PyPI
autodoc_pydanticSphinx extension that automatically generates…
permissive · top 15,000 on PyPI
sphinx-markdown-builderA Sphinx extension that generates Markdown…
permissive · top 15,000 on PyPI
sphinx-codeautolinksphinx-codeautolink automatically converts code…
unclear · top 15,000 on PyPI
sphinx-autodoc-typehintsAutomatically extracts Python type hints from…
permissive · top 5,000 on PyPI
sphinx-llmSphinx extensions that generate LLM-consumable…
permissive · top 15,000 on PyPI