Skip to main content
Decorator for PyCallGraph
#################

TODO

# pip install pycallgraph
# pip install pycallgraphdecorator
# export CREATE_CALL_GRAPH=True
# export CALL_GRAPH_OUTPUT_PATH=./call_graph/
# export CALL_GRAPH_OUTPUT_TYPE=png

Python Call Graph Decorator
#################

Welcome! Python Call Graph Decorator is a `Python <http://www.python.org>`_ module with decorator for easy and effective use pyCallGraph that creates `call graph <http://en.wikipedia.org/wiki/Call_graph>`_ visualizations for Python applications.

.. image:: https://img.shields.io/pypi/v/pycallgraph.svg
:target: https://crate.io/packages/pycallgraph/

Quick Start
===========

Installation is easy as::

pip install pycallgraphdecorator

Or manually::

python setup.py 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.

Output::

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

@CallGraphDecorator(True)
def test1():
print("Hello Word.")

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

Metadata

Release files for callgraphdecorator 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for callgraphdecorator 1.0.0
File Size Uploaded
callgraphdecorator-1.0.0.tar.gz 38.6 kB Details

Release files / callgraphdecorator-1.0.0.tar.gz

Download URL callgraphdecorator-1.0.0.tar.gz
Size 38.6 kB
Tags Source
SHA-256 checksum
How to use checksums
626cac44c0c87d76f22e88dfc8cb9f793cc1cfe59f5611dcaafa56e2e40bd5ad
BLAKE2b-256 checksum
How to use checksums
8332ed906ed3f6b07d10ddcc73f46d0e84d8cb257e36ba864321b5166d280101
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.0.1

1 release file

This release

1.0.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page