See the Sphinx autodoc page for full documentation.
To document the function mymodule.power
:
.. autofunction:: mymodule.power
To automatically document classes:
.. autoclass:: my_module.MyClass :members: :undoc-members:
- The
:members:
option will automatically generate all documented methods - The
:undoc-members:
option will document all undocumented methods - The
:private-members:
option will document private options (methods that - start with one or two underscores. Ex:
_private
)
- The
To document your module:
.. automodule:: mymodule