Sphinx AutoAPI is an extension for Sphinx that automatically generates API documentation from your Python code, similar to `sphinx.ext.autodoc` but without needing to explicitly list every module, class, or function. It parses your source code and creates reStructuredText files. The current version is 3.8.0, and it typically releases new minor versions every few months.
pip install sphinx-autoapiVerified import paths — ran on the pinned version, not inferred.
To quickly set up Sphinx AutoAPI, first install it and Sphinx. Then, modify your `conf.py` to add `autoapi.extension` to the `extensions` list and configure `autoapi_dirs` to point to the root directory of your Python source code. Finally, reference the generated API documentation from your main `.rst` or `.md` file, typically using a `toctree` that includes `_autoapi/index`.
Upgrade your Python environment to 3.10 or later before upgrading to recent `sphinx-autoapi` versions.
Verify that `autoapi_dirs` contains correct, absolute paths to your package roots. Misconfigured paths will result in empty or incomplete API documentation.
Update to v3.7.0 or newer to receive warnings for non-existent objects. Always double-check that modules/classes/functions referenced in directives actually exist in your configured `autoapi_dirs`.
Always ensure your `astroid` version is compatible with your `sphinx-autoapi` version. It's often best to let `pip` manage `astroid` as a dependency of `sphinx-autoapi` during installation/upgrade.