1 of 5

sphinx-autoapi

Generating API documentation with static analysis

2 of 5

3 of 5

mypackage/

├── docs

│ ├── conf.py

│ └── index.rst

├── mypackage

│ ├── __init__.py

│ ├── _client.py

│ └── _server.py

└── README.md

# conf.py

extensions = [

“sphinx.ext.viewcode”,

...,

“autoapi.extension”,

]

autoapi_dirs = [“../mypackage/”]

4 of 5

# Auto-discover members

.. autoapiclass:: mypackage.Server

:members:

# Or manually specify members

.. autoapiclass:: mypackage.Post

.. autoapiclass:: mypackage.Client

.. autoapimethod:: get_all()

.. autoapimethod:: get(post_id)

5 of 5

sphinx-autoapi

Generating API documentation with static analysis