Visualize Python AST in console.
Project description
astboom
Visualize Python AST/CST in console using ASCII graphics.
AST is displayed as provided by standard ast
module, CST is displayed as provided by lib2to3
.
Example
Usage
Simply provide a valid Python source code string as an argument and a corresponding AST/CST will be displayed.
# astboom --help
Usage: astboom [OPTIONS] [SOURCE]
Options:
--engine [AST|CST] Display source code using selected engine.
--ast / --cst Display source code as AST or CST (default: AST)
[deprecated].
--no-pos Hide 'col_offset' and 'lineno' fields.
--hide-empty Hide empty fields.
--help Show this message and exit.
If no source provided as an argument, then tool will attempt to read it from STDIN.
Installation
# pip install astboom
Getting started with development
# git clone https://github.com/lensvol/astboom
# poetry install --develop
License
This project is licensed under the MIT License - see the LICENSE file for details
Authors
- Kirill Borisov (lensvol@gmail.com)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
astboom-0.2.2.tar.gz
(4.9 kB
view hashes)