skillfed

sphinxcontrib-apidoc

A Sphinx extension for running 'sphinx-apidoc' on each build

sphinxcontrib-apidoc v0.6.0 195.6K downloads/30d#9,810 on PyPI65
Permissive license BSD License Active released

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-apidoc

uv

uv add sphinxcontrib-apidoc

poetry

poetry add sphinxcontrib-apidoc

Installing 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

Development Status :: 4 - BetaEnvironment :: ConsoleFramework :: Sphinx :: ExtensionIntended Audience :: DevelopersIntended Audience :: Information TechnologyLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: DocumentationTopic :: Documentation :: SphinxTopic :: Utilities

Tags

sphinx api documentation generationsphinx-apidoc extensionautomatic api docs sphinxsphinx autodoc automationpython api documentation toolsphinx build integrationapi reference generator
sphinx-extensionapi-documentationbuild-automation

More Utilities packages