Skip to main content

Toolkit for easy searching and manipulation of python source code using redbaron.

Project description

# Baroness

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

baroness-1.0.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

baroness-1.0.0-py2.py3-none-any.whl (6.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file baroness-1.0.0.tar.gz.

File metadata

  • Download URL: baroness-1.0.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for baroness-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4310c593cfdde304450c24c8681cdcef81bac876b35fb8100b9f414a1834d19f
MD5 e8fdb7db7153403f129cd895853b8200
BLAKE2b-256 eb704d4c37802e456dbb2dea9db2cd69a92b8455fad59c5758ad4784fca56d64

See more details on using hashes here.

File details

Details for the file baroness-1.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for baroness-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 165c9ae821925039a2902726ca6e07d0d7b02ead6f78ebd12f94bc0bc5cd6f7a
MD5 6c585381b9b3551885545885ce9d56ef
BLAKE2b-256 cb5f0ae3dbb90c4da6d1f2ae946749ff2b48036091837efb1e0c29098b966e18

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page