Indexed code search for Python - ripgrep-parity regex search over a persisted trigram index, with ranked definition-first results.
Project description
gist - indexed code search for Python
Exact regex search over a working tree, with ripgrep's semantics and a persisted trigram index underneath. Same ignore precedence, same match semantics; the index just proves most files cannot match before anything opens them, and every survivor is checked against current bytes.
pip install gist-search
The distribution is gist-search but the import stays gist. The plain gist
name on PyPI belongs to an unrelated author, so installing under it would fetch
a stranger's package; this is the same bs4 / PIL / cv2 split.
import gist
for m in gist.search(r"func\s+\w+\(", paths=["src/server/api"]):
print(f"{m.path}:{m.line_number}: {m.text}")
hits = gist.files("TODO", types=["py"])
total = gist.count("panic", paths=["services"])
refs = gist.rank("SearchRequest", limit=8)
rank is the one with no grep equivalent: it puts a symbol's definition above
its two hundred call sites and sinks generated files below authored ones, which
is the shape you want when the best hit matters more than every hit.
This package exposes search and its trigram-index lifecycle only. Kinship lives
in relate-search and the composed
verbs in blast-search; importing
gist does not make either reachable. It depends on the
irregex Python package for the shared
substrate (request types, row protocol, shell / daemon / native transports),
which imports as irgx.
What it needs
The gist binary on PATH (or $GIST_BIN), which
the repository builds with
zig build. No index is required; without one gist scans the live tree and
returns the same answers, just slower.
Layout
| Path | Owns |
|---|---|
gist/exact/ |
SearchRequest consumers — aggregate, ranked, warm Engine/Cursor |
gist/index/ |
trigram index status / build / capabilities |
gist/agent.py |
tool-boundary dict → SearchRequest |
Shared contract mirrors, the analytic ladder, and binary location live under
irgx.contract / irgx.runtime.
The rest of the family
| Package | Question |
|---|---|
gist-search |
where is this exact pattern? |
relate-search |
what resembles this, and what repeats? |
blast-search |
what breaks if I change this symbol? |
irregex |
the linear-time regex engine underneath all three |
Development
cd bindings/python && uv sync --group dev && uv run pytest
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gist_search-1.0.0.tar.gz.
File metadata
- Download URL: gist_search-1.0.0.tar.gz
- Upload date:
- Size: 73.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2bde02a7e2ad8b9ec3dd2ea7b51361bba545527abe025da74c456f1e73b660c
|
|
| MD5 |
fa4cc1ce0844e9ea21765f9904ef81df
|
|
| BLAKE2b-256 |
b211c41b88d001beb0b89982788401e312376cd73dfb088ea9ea2c6fa8e63972
|
Provenance
The following attestation bundles were made for gist_search-1.0.0.tar.gz:
Publisher:
release.yml on The-Billy-Company/gist
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gist_search-1.0.0.tar.gz -
Subject digest:
d2bde02a7e2ad8b9ec3dd2ea7b51361bba545527abe025da74c456f1e73b660c - Sigstore transparency entry: 2330488915
- Sigstore integration time:
-
Permalink:
The-Billy-Company/gist@82a179da04f7752153e9836dbb825cb41600ca71 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/The-Billy-Company
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@82a179da04f7752153e9836dbb825cb41600ca71 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gist_search-1.0.0-py3-none-any.whl.
File metadata
- Download URL: gist_search-1.0.0-py3-none-any.whl
- Upload date:
- Size: 36.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1075325f8a41358a99541b87eb7da9475f74ade86cd3a1851a12cfe5fafe96fc
|
|
| MD5 |
f58f8f7373e5e9c5ccb11993ba851fb8
|
|
| BLAKE2b-256 |
064d78d78b4d77e04cd704a5f40e165552552d78cd3bc33aab13bc298968b09b
|
Provenance
The following attestation bundles were made for gist_search-1.0.0-py3-none-any.whl:
Publisher:
release.yml on The-Billy-Company/gist
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gist_search-1.0.0-py3-none-any.whl -
Subject digest:
1075325f8a41358a99541b87eb7da9475f74ade86cd3a1851a12cfe5fafe96fc - Sigstore transparency entry: 2330489290
- Sigstore integration time:
-
Permalink:
The-Billy-Company/gist@82a179da04f7752153e9836dbb825cb41600ca71 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/The-Billy-Company
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@82a179da04f7752153e9836dbb825cb41600ca71 -
Trigger Event:
push
-
Statement type: