Toolkit for easy searching and manipulation of python source code using redbaron.
Project description
Toolkit for easy searching and manipulation of python source code using redbaron.
Installation
pip install baroness
Usage
Searching
You can search through python code using the redbaron API on the commandline. By default baroness will search through all python files from the current directory down recursively. The search pattern is just regular python code that would work with redbaron. The top level node is called root.
For example to search for all name nodes with a value of bar:
baroness 'root("name", value="bar")'
Caching
Parsing python files to a baron fst can be time consuming for large code bases. Baroness can cache the baron fst as json files to save time when searching. By default caching isn’t enabled, but will be used if baroness finds a .baroness directory.
To enable caching (and initially create cache) you can use:
baroness cache init
To delete all .baroness directories recursively use:
baroness cache delete
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 baroness-1.0.1.tar.gz
.
File metadata
- Download URL: baroness-1.0.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cb9078f9602729f910bdc692c5a690f5cde32ac834b217e633cda5efc4c1534 |
|
MD5 | 0b699948f50a13dcdfab519358f49e6c |
|
BLAKE2b-256 | 065e8c569f93be4105eb2b5ee747ab5be5aaad6f10e8006484c22154915ed571 |
File details
Details for the file baroness-1.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: baroness-1.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5cad179ae51fa86ac8d0da7b8fe6a8db69b10d664870af1775152fa7c02f448 |
|
MD5 | c7d93a386b375b3070ddee0ded43ed34 |
|
BLAKE2b-256 | 080d620a418d6db8a1d8caf4869d495f7d4f27600595d04a48d8eb3771652c56 |