LogoopenSUSE Build Service > Projects
Sign Up | Log In

A simple program and library to auto generate API documentation for Python modules.

Module pdoc provides types and functions for accessing the public documentation of a Python module. This includes modules (and sub-modules), functions, classes and module, class and instance variables. Docstrings are taken from modules, functions and classes using the special __doc__ attribute. Docstrings for variables are extracted by examining the module’s abstract syntax tree.

The public interface of a module is determined through one of two ways. If __all__ is defined in the module, then all identifiers in that list will be considered public. No other identifiers will be considered as public. Conversely, if __all__ is not defined, then pdoc will heuristically determine the public interface. There are three rules that are applied to each identifier in the module:

    If the name starts with an underscore, it is not public.
    If the name is defined in a different module, it is not public.
    If the name refers to an immediate sub-module, then it is public.

Once documentation for a module is created with pdoc.Module, it can be output as either HTML or plain text using the covenience functions pdoc.html and pdoc.text, or the corresponding methods pdoc.Module.html and pdoc.Module.text.

Alternatively, you may run an HTTP server with the pdoc script included with this module.

Source Files

Filename Size Changed Actions
pdoc-0.3.2.tar.gz 74.7 KB Download File
python-pdoc.spec 3.05 KB Download File

Comments for home:Tomcat42 (0)

Login required, please login or signup in order to comment