Skip to main content

A free extension for Sphinx (the documentation generator) that automatically generates .rst files for Python modules. Each module is a page with autodoc and navigation subheadings for each class, and each package has an autosummary with links and description for each of the the modules it contains.

The project this was originally developed for the PySys test framework. To see what the documentation for a typical module looks like, see here.

Current supported Sphinx version is v8.

Features include:

  • A strong emphasis on extensibility by writing simple Python callbacks. The extension takes care of walking the Python hierarchy (the tricky bit), but lets you choose exactly what you want the rst to look like, using the full power of Python rather than the (sometimes) restrictive templating library approach taken by other plugins.

  • Nice defaults that give an autosummary table for each package so users know what each of the contained modules is for, and for each module a single page listing all the classes (and other members) with a navbar-visible subheading for each class.

  • Skipping of modules (e.g. internal modules) controlled by a regular expression.

  • Ability to customize the autodoc configuration for individual modules.

  • Ability to choose the title of each topic using a Python callback.

  • Automatic generation of .rst files as part of conf.py without the need to separately run a tool like autogen first.

Sample

To use it, just add a few lines to your conf.py:

extensions = [
        ...
        'sphinx.ext.autodoc',
        'sphinx.ext.autosummary',
        'sphinxcontrib_autodocgen',
]

autodocgen_config = [{
        'modules':['mymodule'], # (assumes you've added the parent dir of your module to sys.path)
        'generated_source_dir': DOC_SOURCE_DIR+'/autodocgen-output/',

        # if module matches this then it and any of its submodules will be skipped
        'skip_module_regex': '(.*[.]__|myskippedmodule)',

        # produce a text file containing a list of everything documented. you can use this in a test to notice when you've
        # intentionally added/removed/changed a documented API
        'write_documented_items_output_file': 'autodocgen_documented_items.txt',

        # customize autodoc on a per-module basis
        'autodoc_options_decider': {
                'mymodule.FooBar':    { 'inherited-members':True },
        },

        # choose a different title for specific modules, e.g. the toplevel one
        'module_title_decider': {'mymodule': 'API Reference'},
}]

Metadata

Release files for sphinx-autodocgen 1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinx-autodocgen 1.4
File Size Uploaded
sphinx_autodocgen-1.4.tar.gz 10.9 kB Details

Release files / sphinx_autodocgen-1.4.tar.gz

Download URL sphinx_autodocgen-1.4.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2a2d66740cd72e883480f41ad889bf0dff30e1daa61fda5727524e2d3f961e5b
BLAKE2b-256 checksum
How to use checksums
df29206c7690c4b1fbdb7f62b3177a83f8b6c1663b19b9c13a4e259411afd071
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 18, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.4 This release

1 release file

1.3

1 release file

1.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page