Skip to content

A tool to visualise Python function calls and code complexity.

Notifications You must be signed in to change notification settings

tom-draper/call-graph-viz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Call Graph Visualiser

A Python function call graph visualiser tool to help you visualise the complexity and structure of your Python programs.

Each node is a Python function and the directed connections drawn between them represent function calls. The thickness of the connection represents the number of times the function call is made. Nodes are colour coded by the class they belong to.

Example2

Usage

Install npm dependencies:

npm install

Copy the Python code you wish to visualise into the /code directory.

Run the main.js file using node, followed by the name of the Python file to visualise:

node main <filename>.py

Command Line Arguments

imports flag (Boolean)

If available, include other Python files imported by the specified Python file. Defaults to true.

node main <filename>.py -stdlib false

stdlib flag (Boolean)

Include functions of the Python Standard Library. Defaults to false.

node main <filename>.py -imports true