A query tool for Python abstract syntax trees
Project description
A command-line utility for grepping Python files using XPath syntax (or CSS selectors) against the Python AST (Abstract Syntax Tree).
In other words, this allows you to search Python code against specific syntax elements (function definitions, arguments, assignments, variables etc), instead of grepping for string matches.
The interface and behaviour is designed to match grep and ripgrep as far as it makes sense to do so.
See the documentation for more information, or the docs folder.
History
This project was forked from https://github.com/hchasestevens/astpath by H. Chase Stevens. Main changes:
Added a test suite
Many bugs fixed
Significant rewrite of parts of code
Changes to match grep/ripgrep, including formatting and automatic filtering.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyastgrep-1.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5498674adfd7740e3e85db790101117f5f4e1194ceafd44c7922f5aed9138ac |
|
MD5 | ebd4c64b6199b4a4a4d55768ff91babd |
|
BLAKE2b-256 | b62606c3a518d9d548c8165ded469ab4dddcdced072a699eb0e2cf68f2a09fdf |