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
File details
Details for the file pyastgrep-1.3.2.tar.gz
.
File metadata
- Download URL: pyastgrep-1.3.2.tar.gz
- Upload date:
- Size: 27.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1eece34aff30842bf0b1225489a80d325c33bfa14f18612f495780d711c13ab7 |
|
MD5 | 00b4610003c55e4fadb5e30e5ce2bc20 |
|
BLAKE2b-256 | f97fbe447fc8c3b468ca545a24f732a75178afdcc136c966ba5cb0e3883a556c |
File details
Details for the file pyastgrep-1.3.2-py3-none-any.whl
.
File metadata
- Download URL: pyastgrep-1.3.2-py3-none-any.whl
- Upload date:
- Size: 21.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5498674adfd7740e3e85db790101117f5f4e1194ceafd44c7922f5aed9138ac |
|
MD5 | ebd4c64b6199b4a4a4d55768ff91babd |
|
BLAKE2b-256 | b62606c3a518d9d548c8165ded469ab4dddcdced072a699eb0e2cf68f2a09fdf |