ast-grep-py-0.42.1
0.42.1
0.42.0
0.41.1
0.41.0
0.40.5
0.40.4
0.40.3
0.40.2
0.40.1
0.40.0
0.39.9
0.39.7
0.39.6
0.39.5
0.39.4
0.39.3
0.39.2
0.39.1
0.39.0
0.38.7
0.38.6
0.38.5
0.38.4
0.38.3
0.38.2
0.38.1
0.38.0
0.37.0
0.36.3
0.36.2
0.36.1
0.36.0
0.35.0
0.34.4
0.34.3
0.34.2
0.34.1
0.34.0
0.33.1
0.33.0
0.32.3
0.32.2
0.32.1
0.32.0
0.31.1
0.31.0
0.30.1
0.30.0
0.29.0
0.28.1
0.28.0
0.27.3
0.27.2
0.27.1
0.27.0
0.26.3
0.26.2
0.26.1
0.26.0
0.25.7
0.25.6
0.25.5
0.25.4
0.25.3
0.25.2
0.25.1
0.25.0
0.24.1
0.24.0
0.23.1
0.23.0
0.22.6
0.22.5
0.22.4
0.22.3
0.22.2
0.22.1
0.22.0
0.21.4
0.21.3
0.21.2
0.21.1
0.20.5
0.20.4
0.20.3
0.20.2
0.20.1
0.20.0
0.19.4
0.19.3
0.19.2
0.19.1
0.19.0
0.18.1
0.18.0
0.17.1
0.17.0
0.16.1
0.16.0
0.15.1
0.15.0
0.14.4
0.14.3
0.14.2
0.14.1
0.13.2
0.13.1
0.13.0
0.42.1
0.42.0
0.41.1
0.41.0
0.40.5
0.40.4
0.40.3
0.40.2
0.40.1
0.40.0
0.39.9
0.39.7
0.39.6
0.39.5
0.39.4
0.39.3
0.39.2
0.39.1
0.39.0
0.38.7
0.38.6
0.38.5
0.38.4
0.38.3
0.38.2
0.38.1
0.38.0
0.37.0
0.36.3
0.36.2
0.36.1
0.36.0
0.35.0
0.34.4
0.34.3
0.34.2
0.34.1
0.34.0
0.33.1
0.33.0
0.32.3
0.32.2
0.32.1
0.32.0
0.31.1
0.31.0
0.30.1
0.30.0
0.29.0
0.28.1
0.28.0
0.27.3
0.27.2
0.27.1
0.27.0
0.26.3
0.26.2
0.26.1
0.26.0
0.25.7
0.25.6
0.25.5
0.25.4
0.25.3
0.25.2
0.25.1
0.25.0
0.24.1
0.24.0
0.23.1
0.23.0
0.22.6
0.22.5
0.22.4
0.22.3
0.22.2
0.22.1
0.22.0
0.21.4
0.21.3
0.21.2
0.21.1
0.20.5
0.20.4
0.20.3
0.20.2
0.20.1
0.20.0
0.19.4
0.19.3
0.19.2
0.19.1
0.19.0
0.18.1
0.18.0
0.17.1
0.17.0
0.16.1
0.16.0
0.15.1
0.15.0
0.14.4
0.14.3
0.14.2
0.14.1
0.13.2
0.13.1
0.13.0
توضیحات
Structural Search and Rewrite code at large scale using precise AST pattern.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | ast-grep-py-0.42.1 |
| نام | ast-grep-py |
| نسخه کتابخانه | 0.42.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | ['Herrington Darkholme <2883231+HerringtonDarkholme@users.noreply.github.com>'] |
| نویسنده | - |
| ایمیل نویسنده | Herrington Darkholme <2883231+HerringtonDarkholme@users.noreply.github.com> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/ast-grep-py/ |
| مجوز | MIT |
# ast-grep python binding
[](https://pypi.org/project/ast-grep-py/)
[](https://ast-grep.github.io/)
<p align=center>
<img src="https://ast-grep.github.io/logo.svg" alt="ast-grep"/>
</p>
## ast-grep
`ast-grep` is a tool for code structural search, lint, and rewriting.
This crate intends to build a native python binding of ast-grep and provide a python API for programmatic usage.
## Installation
```bash
pip install ast-grep-py
```
## Usage
You can take our tests as examples. For example, [test_simple.py](./tests/test_simple.py) shows how to use ast-grep to search for a pattern in a file.
Please see the [API usage guide](https://ast-grep.github.io/guide/api-usage.html) and [API reference](https://ast-grep.github.io/reference/api.html) for more details.
Other resources include [ast-grep's official site](https://ast-grep.github.io/) and [repository](https://github.com/ast-grep/ast-grep).
## Development
### Setup virtualenv
```shell
python -m venv venv
```
### Activate venv
```shell
source venv/bin/activate
```
### Install `maturin`
```shell
pip install maturin[patchelf]
```
### MacOS: Install `patchelf` and `maturin`
```shell
brew install patchelf
pip install maturin
```
### Build bindings
```shell
maturin develop
```
### Run tests
```shell
pytest
```
All tests files are under [tests](./tests) directory.
## License
This project is licensed under the MIT license.
نیازمندی
| مقدار | نام |
|---|---|
| xtr | pytest>=7; |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8 | Python |
نحوه نصب
نصب پکیج whl ast-grep-py-0.42.1:
pip install ast-grep-py-0.42.1.whl
نصب پکیج tar.gz ast-grep-py-0.42.1:
pip install ast-grep-py-0.42.1.tar.gz