Package epydoc

[hide private]
[frames] | no frames]

# Package epydoc

source code

Automatic Python reference documentation generator. Epydoc processes Python modules and docstrings to generate formatted API documentation, in the form of HTML pages. Epydoc can be used via a command-line interface (epydoc.cli) and a graphical interface (epydoc.gui). Both interfaces let the user specify a set of modules or other objects to document, and produce API documentation using the following steps:

1. Extract basic information about the specified objects, and objects that are related to them (such as the values defined by a module). This can be done via introspection, parsing, or both:
   - Introspection imports the objects, and examines them directly using Python's introspection mechanisms.
   - Parsing reads the Python source files that define the objects, and extracts information from those files.
2. Combine and process that information.
   - Merging: Merge the information obtained from introspection & parsing each object into a single structure.
   - Linking: Replace any "pointers" that were created for imported variables with the documentation that they point to.
   - Naming: Assign unique canonical names to each of the specified objects, and any related objects.
   - Docstrings: Parse the docstrings of each of the specified objects.
   - Inheritance: Add variables to classes for any values that they inherit from their base classes.
3. Generate output. Output can be generated in a variety of formats:
   - An HTML webpage.
   - A LaTeX document (which can be rendered as a PDF file)
   - A plaintext description.

Overview of epydoc's architecture -- The boxes represent steps in epydoc's processing chain. Arrows are annotated with the data classes used to communicate between steps. The lines along the right side mark what portions of the processing chain are initiated by build_doc_index() and cli(). Click on any item to see its documentation.

# Package Organization

The epydoc package contains the following subpackages and modules:

Package Tree for epydoc

The user interfaces are provided by the gui and cli modules. The apidoc module defines the basic data types used to record information about Python objects. The programmatic interface to epydoc is provided by docbuilder. Docstring markup parsing is handled by the markup package, and output generation is handled by the docwriter package. See the submodule list for more information about the submodules and subpackages.

Author: Edward Loper

Requires: Python 2.3+

Version: 3.0.1

See Also:
  The epydoc webpage, The epytext markup language manual

To Do:

- Create a better default top_page than trees.html.
- Fix trees.html to work when documenting non-top-level modules/packages
- Implement @include
- Optimize epytext
- More doctests
- When introspecting, limit how much introspection you do (eg, don't construct docs for imported modules' vars if it's not necessary)

Bug: UserDict.* is interpreted as imported .. why??

License: IBM Open Source License

Copyright: © 2006 Edward Loper

Contributors (Alphabetical Order):

- Glyph Lefkowitz
- Edward Loper
- Bruce Mitchener
- Jeff O'Halloran
- Simon Pamies
- Christian Reis
- Daniele Varrazzo

Submodules | [hide private]

User Interface

- epydoc.cli: Command-line interface for epydoc.
- epydoc.gui: Graphical interface to epydoc.

Basic Data Types

- epydoc.apidoc: Classes for encoding API documentation about Python programs.

Documentation Generation

- epydoc.docbuilder: Construct data structures that encode the API documentation for Python objects.
- epydoc.docintrospecter: Extract API documentation about python objects by directly introspecting their values.
- epydoc.docparser: Extract API documentation about python objects by parsing their source code.

Docstring Processing

- epydoc.docstringparser: Parse docstrings and handle any fields it defines, such as `@type` and `@author`.
- epydoc.markup: Markup language support for docstrings.
  - epydoc.markup.doctest: Syntax highlighting for doctest blocks.
  - epydoc.markup.epytext: Parser for epytext strings.
  - epydoc.markup.javadoc: Epydoc parser for Javadoc docstrings.
  - epydoc.markup.plaintext: Parser for plaintext docstrings.
  - epydoc.markup.pyval_repr: Syntax highlighter for Python values.
  - epydoc.markup.restructuredtext: Epydoc parser for ReStructuredText strings.

Output Generation

- epydoc.docwriter: Output generation.
  - epydoc.docwriter.dotgraph: Render Graphviz directed graphs as images.
  - epydoc.docwriter.html: The HTML output generator for epydoc.
  - epydoc.docwriter.html_colorize: Functions to produce colorized HTML code for various objects.
  - epydoc.docwriter.html_css: Predefined CSS stylesheets for the HTML outputter (epydoc.docwriter.html).
  - epydoc.docwriter.html_help: Default help file for the HTML outputter (epydoc.docwriter.html).
  - epydoc.docwriter.latex: The LaTeX output generator for epydoc.
  - epydoc.docwriter.plaintext: Plaintext output generation.
  - epydoc.docwriter.xlink: A Docutils interpreted text role for cross-API reference support.

Completeness Checking

- epydoc.checker: Documentation completeness checker.

Miscellaneous

- epydoc.compat: Backwards compatibility with previous versions of Python.
- epydoc.log: Functions used to report messages and progress updates to the user.
- epydoc.test: Regression testing.
  - epydoc.test.util: Utility functions used by the regression tests (`*.doctest`).
- epydoc.util: Miscellaneous utility functions that are used by multiple modules.

Variables | [hide private]

| DEBUG = `True` True if debugging is turned on.
| __author__ = ``'``Edward Loper <edloper@gradient.cis.upenn.edu>``'`` The primary author of eypdoc
| __license__ = ``'``IBM Open Source License``'`` The license governing the use and distribution of epydoc
| __url__ = ``'``http://epydoc.sourceforge.net``'`` The URL for epydoc's homepage
| __version__ = ``'``3.0.1``'`` The version of epydoc