astboom-0.4.2
توضیحات
Visualize Python AST in console.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | astboom-0.4.2 |
| نام | astboom |
| نسخه کتابخانه | 0.4.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Kirill Borisov |
| ایمیل نویسنده | lensvol@gmail.com |
| آدرس صفحه اصلی | https://github.com/lensvol/astboom |
| آدرس اینترنتی | https://pypi.org/project/astboom/ |
| مجوز | MIT |
# astboom



[](https://github.com/psf/black)
Visualize Python AST/CST/ST in console using ASCII graphics using various engines.
Engines available:
* **[ast](https://docs.python.org/3/library/ast.html)** module
* **[parser](https://docs.python.org/3/library/parser.html)** module
* **lib2to3**
* **[LibCST](https://github.com/Instagram/LibCST)**
## Example

## Usage
Simply provide a valid Python source code string as an argument
and a corresponding AST/CST/ST will be displayed.
### AST
```
Usage: astboom ast [OPTIONS] [SOURCE]
Display Abstract Syntax Tree for a given source.
Options:
--no-pos Hide 'col_offset' and 'lineno' fields.
--hide-empty Hide empty fields.
```
### lib2to3 CST
```
Usage: astboom cst [OPTIONS] [SOURCE]
Display Concrete Source Tree for a given source.
Options:
--show-prefix Display value stored in 'prefix' field of the node.
```
### Python parse tree
```
Usage: astboom st [OPTIONS] [SOURCE]
Display Python parse tree for a given source.
```
### LibCST tree
```
Usage: astboom libcst [OPTIONS] [SOURCE]
Display LibCST tree for a given source.
Options:
--hide-default Hide fields that contain default value
(MaybeSentinel.DEFAULT).
--hide-empty Hide fields that contain empty values ([], (), '').
--hide-fmt Hide formatting-related fields and objects (whitespace,
newlines).
--show-children Show contents of the 'children' attribute.
```
If no source provided as an argument, then tool will attempt to read it
from *STDIN*.
## Installation
```shell script
# pip install astboom
```
## Getting started with development
```shell script
# git clone https://github.com/lensvol/astboom
# poetry install
```
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
## Authors
* **Kirill Borisov** ([lensvol@gmail.com](mailto:lensvol@gmail.com))
نیازمندی
| مقدار | نام |
|---|---|
| >=0.3.3,<0.4.0 | asciitree |
| >=7.0,<8.0 | click |
| >=0.3.1,<0.4.0 | libcst |
| >=5.3,<6.0 | pyyaml |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6,<4.0 | Python |
نحوه نصب
نصب پکیج whl astboom-0.4.2:
pip install astboom-0.4.2.whl
نصب پکیج tar.gz astboom-0.4.2:
pip install astboom-0.4.2.tar.gz