Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include automatically all classes, methods and functions in a sphinx documentation? [duplicate]

I try to create a html documentation for a project containing several thousand classes using sphinx and it's autodoc plugin. sphinx-apidoc creates wonderful rst-files, but lacks of an automatic creation of autoclasses and automethods.

Is there a way/command/utility in sphinx to auto-include all variables, functions, classes and decorators in the documentation?

Some sample code of one rst-file:

tagger Package
=================

:mod:`tagger` Package
------------------------
.. automodule:: project.tagger
    :members:


:mod:`client` Module
--------------------
.. automodule:: project.analyzers.tagger.client
    :members:
like image 760
Jon Avatar asked Jan 02 '13 10:01

Jon


People also ask

What is Sphinx rst?

reStructuredText is the default plaintext markup language used by Sphinx. This section is a brief introduction to reStructuredText (reST) concepts and syntax, intended to provide authors with enough information to author documents productively.


1 Answers

There is a Sphinx extension which will help you in this called autodoc.

If you want to include the class then you have to write:

.. autoclass:: <ClassName>

Similarly for a method:

.. automethod:: <MethodName>
like image 193
Nilesh Avatar answered Oct 13 '22 01:10

Nilesh