Python Call Graph is a Python module that creates call graph visualizations for Python applications.
Python Call Graph
Note: This is a fork of the original pycallgraph since it became unmaintained.
The fork needs documentation. Feel free to contribute :)
License: GNU GPLv2
- Support for Python 2.7+ and Python 3.3+.
- Static visualizations of the call graph using various tools such as Graphviz and Gephi.
- Execute pycallgraph from the command line or import it in your code.
- Customisable colors. You can programatically set the colors based on number of calls, time taken, memory usage, etc.
- Modules can be visually grouped together.
- Easily extendable to create your own output formats.
- Graphviz is open source software and can be installed on Ubuntu/Debian via
apt install graphviz, or equivalent on other distributions. See here for more information.
Installation is easy as:
pip install pycallgraph2
The following examples specify graphviz as the outputter, so it's required to be installed. They will generate a file called
The command-line method of running pycallgraph is::
$ pycallgraph graphviz -- ./mypythonscript.py
A simple use of the API is::
from pycallgraph2 import PyCallGraph from pycallgraph2.output import GraphvizOutput with PyCallGraph(output=GraphvizOutput()): code_to_profile()
Documentation for the fork is a work in progress.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size pycallgraph2-1.1.3-py2.py3-none-any.whl (30.9 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
|Filename, size pycallgraph2-1.1.3.tar.gz (28.1 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for pycallgraph2-1.1.3-py2.py3-none-any.whl