Jonga is a Python package that generates a directed graph representing function calls within a block of Python code, intended for inclusion in Sphinx package documentation. There are a number of alternative packages with similar goals, including

but none of them is entirely suitable for generating function/method call vizualizations for inclusion within package documentation. In particular, none of these other packages correctly identifies method classes within a hierarchy of derived classes.

Jonga is used to generate call graphs to help document the relatively complex class structure in the SPORCO package, as illustrated in this example (note that the method names are clickable, linking to the corresponding entries in the documentation).

Usage Examples

Scripts illustrating usage of the package can be found in the examples directory of the source distribution. These examples can be run from the root directory of the package by, for example

python3 examples/example1.py

To run these scripts prior to installing the package it will be necessary to first set the PYTHONPATH environment variable to include the root directory of the package. For example, in a bash shell


from the root directory of the package.

Jupyter Notebook versions of the example scripts are also available in the same directory. The notebooks can also be viewed online via nbviewer, or run interactively at binder.


Please submit bug reports, comments, etc. to brendt@ieee.org.