module documentation

Generate the API docs using pydoctor to be integrated into Sphinx build system.

This was designed to generate pydoctor HTML files as part of the Read The Docs build process.

Inside the Sphinx conf.py file you need to define the following configuration options:

  • pydoctor_url_path - defined the URL path to the API documentation You can use {rtd_version} to have the URL automatically updated based on Read The Docs build.
  • (private usage) a mapping with values URL path definition. Make sure each definition will produce a unique URL.
  • pydoctor_args - Sequence with all the pydoctor command line arguments used to trigger the build.
    • (private usage) a mapping with values as sequence of pydoctor command line arguments.

The following format placeholders are resolved for pydoctor_args at runtime:

  • {outdir} - the Sphinx output dir

You must call pydoctor with --quiet argument as otherwise any extra output is converted into Sphinx warnings.

Function on​_build​_finished Called when Sphinx build is done.
Function on​_builder​_inited Called to build the API documentation HTML files and inject our own intersphinx inventory object.
Function setup Called by Sphinx when the extension is initialized.
Variable logger Undocumented
Function ​_get​_arguments Return the resolved arguments for pydoctor build.
Function ​_run​_pydoctor Call pydoctor with arguments.
def on_build_finished(app, exception):
Called when Sphinx build is done.
Parameters
app:SphinxUndocumented
exception:ExceptionUndocumented
def on_builder_inited(app):
Called to build the API documentation HTML files and inject our own intersphinx inventory object.
Parameters
app:SphinxUndocumented
def setup(app):
Called by Sphinx when the extension is initialized.
Parameters
app:SphinxUndocumented
Returns
Mapping[str, Any]The extension version and runtime options.
logger =

Undocumented

def _get_arguments(arguments, placeholders):
Return the resolved arguments for pydoctor build.
Parameters
arguments:Sequence[str]Sequence of proto arguments used to call pydoctor.
placeholders:Mapping[str, str]Undocumented
Returns
Sequence[str]Sequence with actual acguments use to call pydoctor.
def _run_pydoctor(name, arguments):
Call pydoctor with arguments.
Parameters
name:strA human-readable description of this pydoctor build.
arguments:Sequence[str]Command line arguments used to call pydoctor.