| Crates.io | ast-grep-py |
| lib.rs | ast-grep-py |
| version | 0.33.1 |
| created_at | 2023-11-15 22:00:03.912887+00 |
| updated_at | 2025-01-13 04:27:22.143802+00 |
| 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 | 44,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
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.