Builds recursive calls tree and saves it as a PNG file.
Project description
Recursion tree
Transforms recursive functions in graphical form.
Installation:
pip install recursion_tree
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:
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.0.tar.gz
(1.3 kB
view details)
Built Distributions
File details
Details for the file recursiontree-1.0.tar.gz
.
File metadata
- Download URL: recursiontree-1.0.tar.gz
- Upload date:
- Size: 1.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 688fb52fe3297d5b56fcbafca7eacfafa90b54501a9d0f17a63688ab4591dd74 |
|
MD5 | bf40150033554b3a01148c42b9950b84 |
|
BLAKE2b-256 | fd1d02b7432d33214e8ce1153ac0e2df7ad55192ce1001763348d236d79c4082 |
File details
Details for the file recursiontree-1.0-py3-none-any.whl
.
File metadata
- Download URL: recursiontree-1.0-py3-none-any.whl
- Upload date:
- Size: 2.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ae812786139c4be5669d20b994007fd7f6d391e9d78653b1ffc4036b92866b0 |
|
MD5 | b8c0177a8601846499a905953bda5012 |
|
BLAKE2b-256 | 5db266651bea90ec9b44de462462acdb54d5e9ab806b13a154c2c176a77363f9 |
File details
Details for the file RecursionTree-1.0-py3-none-any.whl
.
File metadata
- Download URL: RecursionTree-1.0-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54a58e152f502e72f29a59a9fdade1243de1dc55b904b7fc7c7b3572de857a3f |
|
MD5 | d582ddbca5f1bde45f68b38093606c0d |
|
BLAKE2b-256 | a62490bfe01976c49d9516140e0a57323f73e084e71983a09ac16af8e7e4e2ea |