Writing docstrings using autodoc

Other topics

Installing the autodoc extension

Add the autodoc module in the extensions list present in the conf.py file at the root of your documentation:

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

Adding your code path in the sphinx config

Autodoc needs to imports your modules to work.

You can include your code path in your conf.py file.

For instance:

import os
sys.path.insert(0, os.path.abspath('../src'))

Contributors

Topic Id: 8100

Example Ids: 26111,26112

This site is not affiliated with any of the contributors.