PySyntax Extension
This extension provides the ability to extract python documentation from within a markdown file. The intended use is for documenting complete python modules and packages. The complete list of available configuration items for the extension are given in Table 1
Table 1: Configuration items for the pysyntax extension.
Key | Default | Description |
---|---|---|
active | True | Toggle for disabling the extension. This only changes the initial active state, use setActive to control at runtime. |
Class Documentation
The "class" command of the extension provides complete documentation for a python class object. For example, the use of the command to generate class documentation for the Extension
object for the pysyntax extension is shown in Example 1.
Example 1: Example use of "pysyntax class" command.
!pysyntax class name=MooseDocs.extensions.pysyntax.PySyntax
MooseDocs.extensions.pysyntax.PySyntax
MooseDocs.extensions.pysyntax.PySyntax(cls)
Helper class for extracting documentation from a python object.
Info
Data struct for storing information about a member.
items(function=None, **kwargs)
Return dict() style generator to name and Info
objects.
The command is designed to operate as a single command within a page. For example, the Listing 1 contains a single command that generates the complete documentation page: moosetree.Node.
Listing 1: Use of "pysyntax class" command to create complete documentation page for a python class.
# moosetree.Node
!pysyntax class name=moosetree.Node
(python/doc/content/python/source/moosetree/Node.md)