Crates.io | ast-grep-py |
lib.rs | ast-grep-py |
version | 0.29.0 |
source | src |
created_at | 2023-11-15 22:00:03.912887 |
updated_at | 2024-10-30 05:37:59.260311 |
description | Search and Rewrite code at large scale using precise AST pattern |
homepage | |
repository | https://github.com/ast-grep/ast-grep |
max_upload_size | |
id | 1036896 |
size | 42,901 |
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.
pip install ast-grep-py
You can take our tests as examples. For example, test_simple.py shows how to use ast-grep to search for a pattern in a file.
Please see the API usage guide and API reference for more details.
Other resources include ast-grep's official site and repository.
python -m venv venv
source venv/bin/activate
maturin
pip install maturin[patchelf]
maturin develop
pytest
All tests files are under tests directory.
This project is licensed under the MIT license.