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.
Metadata
Release files for pycallgraph2 1.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pycallgraph2-1.1.3.tar.gz | 28.1 kB | Without provenance | Details for pycallgraph2-1.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pycallgraph2-1.1.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for pycallgraph2-1.1.3-py2.py3-none-any.whl |
Total release size: 58.9 kB
Release files / pycallgraph2-1.1.3.tar.gz
| Download URL | pycallgraph2-1.1.3.tar.gz |
|---|---|
| Size | 28.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f5d02c1ea446cd7051ad886fc61c6698c1d1f6b759ac5e32ddec5fab153b73c8
|
|
BLAKE2b-256 checksum How to use checksums |
4bdc1f4a1d41daa3ae1a4f8d73f5cc9b1b99a13ad95304d5e5f0f6860abb2b15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / pycallgraph2-1.1.3-py2.py3-none-any.whl
| Download URL | pycallgraph2-1.1.3-py2.py3-none-any.whl |
|---|---|
| Size | 30.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
0e8eb7b8651074c549c6ea2efaee5bd953bcaf2fb028b8ad1abdbad7386eb306
|
|
BLAKE2b-256 checksum How to use checksums |
d57d636c4f8359f82c5b7dc022e59f67b1f3aa7a1875fa5e9ac00e5119daf4bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for pycallgraph2 1.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.