sphinx-autoapi

Sphinx API documentation generator

51 个版本 Python >=3.10
安装
pip install sphinx-autoapi
poetry add sphinx-autoapi
pipenv install sphinx-autoapi
conda install sphinx-autoapi
描述

Sphinx AutoAPI

.. image:: https://readthedocs.org/projects/sphinx-autoapi/badge/?version=latest :target: https://sphinx-autoapi.readthedocs.org :alt: Documentation

.. image:: https://github.com/readthedocs/sphinx-autoapi/actions/workflows/main.yml/badge.svg?branch=main :target: https://github.com/readthedocs/sphinx-autoapi/actions/workflows/main.yml?query=branch%3Amain :alt: Github Build Status

.. image:: https://img.shields.io/pypi/v/sphinx-autoapi.svg :target: https://pypi.org/project/sphinx-autoapi/ :alt: PyPI Version

.. image:: https://img.shields.io/pypi/pyversions/sphinx-autoapi.svg :target: https://pypi.org/project/sphinx-autoapi/ :alt: Supported Python Versions

.. image:: https://img.shields.io/badge/code%20style-ruff-000000.svg :target: https://docs.astral.sh/ruff/ :alt: Formatted with Ruff

Sphinx AutoAPI is a Sphinx extension for generating complete API documentation without needing to load, run, or import the project being documented.

In contrast to the traditional Sphinx autodoc <https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html>_, which requires manual authoring and uses code imports, AutoAPI finds and generates documentation by parsing source code.

For more information, see the full documentation <https://sphinx-autoapi.readthedocs.org>_.

Getting Started

The following steps will walk through how to add AutoAPI to an existing Sphinx project. For instructions on how to set up a Sphinx project, see Sphinx's documentation <https://www.sphinx-doc.org/en/master/usage/quickstart.html>_.

Installation


AutoAPI can be installed through pip:

.. code-block:: bash

    pip install sphinx-autoapi

Next, add and configure AutoAPI in your Sphinx project's `conf.py`.

.. code-block:: python

    extensions.append('autoapi.extension')

    autoapi_dirs = ['path/to/source/files', 'src']

When the documentation is built,
AutoAPI will now generate API documentation into an `autoapi/` directory
and add an entry to the documentation in your top level table of contents!

To configure AutoAPI behaviour further,
see the `Configuration documentation <https://sphinx-autoapi.readthedocs.io/en/latest/reference/config.html>`_.


Contributing
------------

Running the tests

Tests are executed through tox <https://tox.readthedocs.io/en/latest/>_.

.. code-block:: bash

tox

Code Style


Code is formatted using `ruff <https://docs.astral.sh/ruff>`_.

You can check your formatting using ruff format's check mode:

.. code-block:: bash

    tox -e format

You can also get ruff to format your changes for you:

.. code-block:: bash

    ruff format

Release Notes

Release notes are managed through towncrier <https://towncrier.readthedocs.io/en/stable/index.html>_. When making a pull request you will need to create a news fragment to document your change:

.. code-block:: bash

tox -e release_notes -- create --help

Versioning

We use SemVer <https://semver.org/>_ for versioning. For the versions available, see the tags on this repository <https://github.com/readthedocs/sphinx-autoapi/tags>_.

License

This project is licensed under the MIT License. See the LICENSE.rst <LICENSE.rst>_ file for details.

版本列表
3.8.0 2026-03-08
3.7.0 2026-02-11
3.6.1 2025-10-06
3.6.0 2025-02-18
3.5.0 2025-02-10
3.4.0 2024-11-30
3.3.3 2024-10-26
3.3.2 2024-09-25
3.3.1 2024-09-02
3.3.0 2024-08-29
3.2.1 2024-07-23
3.2.0 2024-07-20
3.1.2 2024-06-20
3.1.1 2024-05-23
3.1.0 2024-05-20
3.1.0b0 2024-04-12
3.1.0a3 2024-02-16
3.1.0a2 2024-02-16
3.1.0a1 2024-02-01
3.0.0 2023-09-26
3.0.0a4 2024-03-24
2.1.1 2023-06-10
2.1.0 2023-03-28
2.0.1 2023-01-17
2.0.0 2022-09-28
1.9.0 2022-07-25
1.8.4 2021-08-16
1.8.3 2021-08-01
1.8.2 2021-07-27
1.8.1 2021-04-25
1.8.0 2021-04-13
1.7.0 2021-02-01
1.6.0 2021-01-20
1.5.1 2020-10-03
1.5.0 2020-09-01
1.4.0 2020-06-08
1.3.0 2020-04-06
1.2.1 2019-10-10
1.2.0 2019-10-06
1.1.0 2019-06-23
1.0.0 2019-04-24
0.7.1 2019-02-05
0.7.0 2019-01-31
0.6.2 2018-11-15
0.6.1 2018-11-15
0.6.0 2018-08-20
0.5.0 2017-11-13
0.4.0 2015-11-18
0.3.0 2015-10-12
0.2.0 2015-09-05