Python Call Graph is a Python module that creates call graph visualizations for Python applications.
Project description
Python Call Graph
Note: This is a fork of the original pycallgraph since it became unmaintained.
Welcome! pycallgraph2 is a Python module that creates call graph visualizations for Python applications.
Project Status
The project lives on GitHub, where you can report issues, contribute to the project by forking the project then creating a pull request, or just browse the source code.
The fork needs documentation. Feel free to contribute :)
License: GNU GPLv2
Features
- 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.
Quick Start
OS dependencies:
- 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 pycallgraph.png
.
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
Documentation for the fork is a work in progress.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pycallgraph2-1.1.3.tar.gz
.
File metadata
- Download URL: pycallgraph2-1.1.3.tar.gz
- Upload date:
- Size: 28.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5d02c1ea446cd7051ad886fc61c6698c1d1f6b759ac5e32ddec5fab153b73c8 |
|
MD5 | b4986622976428f008b731f79b674e3b |
|
BLAKE2b-256 | 4bdc1f4a1d41daa3ae1a4f8d73f5cc9b1b99a13ad95304d5e5f0f6860abb2b15 |
File details
Details for the file pycallgraph2-1.1.3-py2.py3-none-any.whl
.
File metadata
- Download URL: pycallgraph2-1.1.3-py2.py3-none-any.whl
- Upload date:
- Size: 30.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e8eb7b8651074c549c6ea2efaee5bd953bcaf2fb028b8ad1abdbad7386eb306 |
|
MD5 | 3904d0bbdca35dbbea45583bd51c181a |
|
BLAKE2b-256 | d57d636c4f8359f82c5b7dc022e59f67b1f3aa7a1875fa5e9ac00e5119daf4bd |