Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 994 Bytes

api.md

File metadata and controls

38 lines (28 loc) · 994 Bytes

API Documentation

Sphinx can automatically generate API documentation from your code with Autodoc. See the Sphinx-Napoleon documentation for examples showing how to write compatible docstrings.

Example

With the following file in api_example/module.py:

    class ExampleClass:
        def do_something(self, param1, param2):
            """Example function with a Google-style docstring.

            Args:
                param1 (str): The first parameter.
                param2 (int): The second parameter.

            Returns:
                bool: True for success, False otherwise.
            """

This markup:

    ```eval_rst
        .. autoclass:: api_example.module.ExampleClass
           :members:
    ```

Will produce:

    .. autoclass:: api_example.module.ExampleClass
       :members: