Skip to main content

A simple sphinx extension to generate UML diagrams with pyreverse

Project description

A simple sphinx extension to generate a UML diagram from python modules.


Install with::

pip install sphinx-pyreverse


Add “sphinx_pyreverse” to the extensions list in your (make sure it is in the PYTHONPATH).

Call the directive with path to python module as content. The :classes: and :packages: flags specify which UML diagrams to show.:

.. uml:: {{modulename}}

Requires pyreverse from pylint.


To configure usage, in your

  • sphinx_pyreverse_output (see –output), default is “png”

  • sphinx_pyreverse_filter_mode (see –filter_mode), default is None

  • sphinx_pyreverse_class (see –class), default is None

  • sphinx_pyreverse_show_ancestors (see –show_ancestors), default is None

  • sphinx_pyreverse_all_ancestors (see –all_ancestors), default is None

  • sphinx_pyreverse_show_associated (see –show_associated), default is None

  • sphinx_pyreverse_all_associated (see –all_associated), default is None

  • sphinx_pyreverse_show_builtin (see –show_builtin), default is None

  • sphinx_pyreverse_module_names (see –module_names), default is None

  • sphinx_pyreverse_only_classnames (see –only_classnames), default is None

  • sphinx_pyreverse_ignore (see –ignore), default is None

Changing the directive

To override the directive, which defaults to ‘uml’ set the SPHINX_PYREVERSE_DIRECTIVE environment variable to whatever you like.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx-pyreverse-0.0.17.tar.gz (19.7 kB view hashes)

Uploaded source

Built Distribution

sphinx_pyreverse-0.0.17-py3-none-any.whl (17.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page