Python API

The primary purpose of the Python API is to define custom sections for the class TOCs. This is done by subclassing the Section class, although a number of helper functions and classes are also available.

autoclasstoc.AutoClassToc(name, arguments, …)

Generate a succinct TOC for automatically documented classes.

autoclasstoc.Section(state, cls)

Format a specific section in a class TOC, e.g.

autoclasstoc.PublicMethods(state, cls)

Include a “Public Methods” section in the class TOC.

autoclasstoc.PrivateMethods(state, cls)

Include a “Private Methods” section in the class TOC.

autoclasstoc.PublicDataAttrs(state, cls)

Include a “Public Data Attributes” section in the class TOC.

autoclasstoc.PrivateDataAttrs(state, cls)

Include a “Private Data Attributes” section in the class TOC.

autoclasstoc.InnerClasses(state, cls)

Include an “Inner Classes” section in the class TOC.

autoclasstoc.is_method(name, attr)

Return true if the given attribute is a method or property.

autoclasstoc.is_data_attr(name, attr[, …])

Return true if the given attribute is a data attribute, e.g.

autoclasstoc.is_public(name)

Return true if the given name is public.

autoclasstoc.is_private(name)

Return true if the given name is private.

autoclasstoc.is_special(name)

Return True if the name starts and ends with a double-underscore.

autoclasstoc.utils

autoclasstoc.nodes

The autoclasstoc module defines two new docutils nodes, which make it possible to create collapsible content in HTML.

autoclasstoc.ConfigError

Indicate an configuration error affecting autoclasstoc.