Skip to main content

Builds recursive calls tree and saves it as a PNG file.

Project description

Recursion tree

Transforms recursive functions in graphical form.

Installation:

pip install RecursionTree

Usage:

@recursion_tree
def fact(x: int) -> int:
    return 1 if x <= 1 else x * fact(x-1)

Just add the 'recursion_tree' decorator to any recursive function. After the run, parameters of the call will be saved as recursion_tree.json. Additional settings might be used via settings.py.

Example of use:
fibo_calls

Project details


Download files

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

Source Distribution

RecursionTree-1.5.tar.gz (26.8 kB view hashes)

Uploaded Source

Built Distribution

RecursionTree-1.5-py3.7.egg (36.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page