crates/pyo3/README.md
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
maturinpip install maturin[patchelf]
patchelf and maturinbrew install patchelf
pip install maturin
maturin develop
pytest
All tests files are under tests directory.
This project is licensed under the MIT license.