example_module module

This is an example Python module for the Python to Read the Docs documentation repository. It is used to show how Sphinx autodoc can be used to auto-generate Python documentation from doc strings like this… Written by Matthew John Hayes

class example_module.ExampleModule

Bases: object

This is the main class of example_module. It doesn’t do anything useful other than show how classes are documented by autodoc

__dict__ = mappingproxy({'__module__': 'example_module', '__doc__': "\n This is the main class of example_module. It doesn't do anything useful\n other than show how classes are documented by autodoc\n ", '__init__': <function ExampleModule.__init__>, 'run': <function ExampleModule.run>, 'increment': <function ExampleModule.increment>, '_private_method': <function ExampleModule._private_method>, '__dict__': <attribute '__dict__' of 'ExampleModule' objects>, '__weakref__': <attribute '__weakref__' of 'ExampleModule' objects>})
__init__()

Initialise the ExampleModule class

__module__ = 'example_module'
__weakref__

list of weak references to the object (if defined)

_private_method()

Example private method that won’t be documented by autodoc unless you add :private-members: to the automodule directive

increment(value)

Increment the value of self.class_variable by value passed to this method

run()

Run the ExampleModule instance