Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Decorator for easy use PyCallGraph

Project description

Python Call Graph Decorator

Welcome! Python Call Graph Decorator is a `Python <>`_ module with decorator for easy and effective use pyCallGraph that creates `call graph <>`_ visualizations for Python applications.

.. image::

Quick Start

Installation is easy as::

pip install pycallgraphdecorator

Or manually::

python install

Decorator is possible turn on permanently or switching ON/OFF via set system environment before start tracking application.

Decorator is write very effective! Condition if graph's are creating is evaluated only ones and if condition is off ten decorator only call method.

Decorator is possible set globally via system environment or locally via decorator parameters.


Each call decorated function create new graph in specific folder. Graphs are named as `function-name_graph-count.graph-type`

Possible system environment::

CREATE_CALL_GRAPH - set create graph On/Off - value True/False, true/false, 0/1 (can by set unique environment name for each decorator - state_setup_env params)
CALL_GRAPH_OUTPUT_PATH - set output path
CALL_GRAPH_OUTPUT_TYPE - set output type - for example "png" (NOT ".png"!!!)

Possible decorator parameters::

always_on=False - graph is crating always (environment CREATE_CALL_GRAPH isn't acceptable) - default False
output_folder - output folder - default "./call_graph/"
output_type - output graph type - default "png"
state_setup_env - enable set specific system environment for turning on/off creating graphs - default "CREATE_CALL_GRAPH"

Simple use of the decorator::

from callgraphdecorator import CallGraphDecorator

def test1():
print("Hello Word.")

if __name__ == '__main__':
test1() // output - ./call_graph/test1_0.png
test1() // output - ./call_graph/test1_1.png

Project details

Download files

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

Files for callgraphdecorator, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size callgraphdecorator-1.0.1.tar.gz (38.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page