Crates.io | ast-grep-py |
lib.rs | ast-grep-py |
version | |
source | src |
created_at | 2023-11-15 22:00:03.912887 |
updated_at | 2024-12-08 20:36:04.083933 |
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 |
Cargo.toml error: | TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
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.