Building and visualising Abstract Syntax Trees for Python code.
Project description
VAST
VAST - Visualise Abstract Syntax Trees for Python.
VAST generates ASTs for a given Python script and builds visualisations of them.
Install
Install from PyPI Here!
How to use
From a python script:
from vast.vast import Vast
v = Vast("./helloworld.py")
# or
v = Vast()
ast = v.generateASTFromPath("./helloworld.py")
v.visualiseASTGraph(ast)
# or
pyString = "print(\"Hello, World!\")"
ast = v.generateASTFromString(pyString)
v.visualiseASTGraph(ast)
# or
pyURL = "https://example.com/helloworld.py"
ast = v.generateASTFromURL(pyURL)
v.visualiseASTGraph(ast)
Or (if installed from source, rather than pip) from the terminal:
python vast.py ./helloworld.py
Like what you see? Buy me a snack
If you want to see more of what I do, you can visit my blog.
If you want to donate to my development work by buying me a snack, I use PayPal.Me.
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
VisAST-0.1.1.tar.gz
(15.8 kB
view hashes)
Built Distribution
VisAST-0.1.1-py3-none-any.whl
(16.0 kB
view hashes)