A Python package with Rust-based ripgrep implementation
Project description
EXPERIMENT: DO NOT USE THIS OR DEPEND ON THIS
A Python package with Rust-based ripgrep implementation using maturin. This package bundles the full ripgrep binary alongside a Python search API.
Features
- Bundled ripgrep binary: Full ripgrep CLI built from source and included in the wheel
- Python search API: Native Python interface for searching
- Built from source: All binaries are compiled from source during wheel building
- Zero runtime dependencies: ripgrep binary is embedded, no system installation needed
- Python 3.13+ support
- Cross-platform wheels for Linux, macOS, and Windows
Installation
pip install sup
Development
Prerequisites
- Python 3.13+
- Rust toolchain
- maturin
Setup
# Clone the repository
git clone <your-repo-url>
cd sup
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install development dependencies
pip install maturin pytest
# Build and install locally
maturin develop
Testing
pytest tests/
Building Wheels
# Build wheel for current platform
maturin build --release
# Build wheels for all platforms (via CI)
# Push to GitHub and CI will build wheels for all platforms
Usage
Python API
from sup import search, RipGrep, ripgrep, get_ripgrep_path
# Simple search using Python API
results = search("pattern", "/path/to/search")
for match in results:
print(f"{match['file']}:{match['line_number']}: {match['line']}")
# Using RipGrep class directly
rg = RipGrep(r"test\d+") # Regex pattern
matches = rg.search("/path/to/file.txt")
# Using the bundled ripgrep binary
result = ripgrep("pattern", ".", "--type", "py")
print(result.stdout)
# Get path to the ripgrep binary (extracted to temp directory)
rg_path = get_ripgrep_path()
print(f"ripgrep binary available at: {rg_path}")
Command Line
After installation, you can use the bundled ripgrep via:
# Use the sup-rg command (installed as console script)
sup-rg pattern /path/to/search
# Or invoke via Python
python -m sup pattern /path/to/search
CI/CD
The project uses GitHub Actions to automatically build wheels for multiple platforms:
- Linux (x86_64, aarch64)
- macOS (x86_64, ARM64)
- Windows (x64, x86)
Wheels are built for Python 3.13 and published to PyPI on tagged releases.
License
MIT
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 Distributions
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 sup-0.1.1.tar.gz.
File metadata
- Download URL: sup-0.1.1.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e327d5b2bab13f9c98de2a8fa28a647765c74a02dde46365facd602e1d0449a
|
|
| MD5 |
2ef57c1432e03e51fd576a18031240f5
|
|
| BLAKE2b-256 |
326fb76a48428ef80fbb377e9dd6ef156af3ed4b2746218b6848628f532436c9
|
Provenance
The following attestation bundles were made for sup-0.1.1.tar.gz:
Publisher:
build.yml on 1st1/sup
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sup-0.1.1.tar.gz -
Subject digest:
3e327d5b2bab13f9c98de2a8fa28a647765c74a02dde46365facd602e1d0449a - Sigstore transparency entry: 382062093
- Sigstore integration time:
-
Permalink:
1st1/sup@411b093bec2df5af803a29a33b672709e654c42e -
Branch / Tag:
refs/heads/master - Owner: https://github.com/1st1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@411b093bec2df5af803a29a33b672709e654c42e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file sup-0.1.1-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: sup-0.1.1-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 4.9 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f51b0e7388a4149514aef4a1ca52cb67219d68178c2d5baf36b02e5f311214c
|
|
| MD5 |
1948b4bfe45f0b8e90bf739d9f6780e5
|
|
| BLAKE2b-256 |
3dccdaf11cefa0079da75c493ac04f70036545980771383477214dde23479b3d
|
Provenance
The following attestation bundles were made for sup-0.1.1-cp313-cp313-win_amd64.whl:
Publisher:
build.yml on 1st1/sup
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sup-0.1.1-cp313-cp313-win_amd64.whl -
Subject digest:
5f51b0e7388a4149514aef4a1ca52cb67219d68178c2d5baf36b02e5f311214c - Sigstore transparency entry: 382062236
- Sigstore integration time:
-
Permalink:
1st1/sup@411b093bec2df5af803a29a33b672709e654c42e -
Branch / Tag:
refs/heads/master - Owner: https://github.com/1st1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@411b093bec2df5af803a29a33b672709e654c42e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file sup-0.1.1-cp313-cp313-win32.whl.
File metadata
- Download URL: sup-0.1.1-cp313-cp313-win32.whl
- Upload date:
- Size: 4.6 MB
- Tags: CPython 3.13, Windows x86
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e68fc2d6426fa0b10253a3d2fb6099b52a567b48eed516c726643634242759db
|
|
| MD5 |
b452370de8fdf735383659bf69b6722d
|
|
| BLAKE2b-256 |
cde244fbb2cf8ad57a67ae0c42ad3f16b7a07dfc1736ff06aff64a7c876aaf1b
|
Provenance
The following attestation bundles were made for sup-0.1.1-cp313-cp313-win32.whl:
Publisher:
build.yml on 1st1/sup
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sup-0.1.1-cp313-cp313-win32.whl -
Subject digest:
e68fc2d6426fa0b10253a3d2fb6099b52a567b48eed516c726643634242759db - Sigstore transparency entry: 382062153
- Sigstore integration time:
-
Permalink:
1st1/sup@411b093bec2df5af803a29a33b672709e654c42e -
Branch / Tag:
refs/heads/master - Owner: https://github.com/1st1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@411b093bec2df5af803a29a33b672709e654c42e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file sup-0.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: sup-0.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 8.2 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1116ca1f0a952c2a237260f0b0224ffe2c8c6c80307c841507a7cdd9b835dd49
|
|
| MD5 |
cfacbdab260512692d09a66993a4123d
|
|
| BLAKE2b-256 |
443c956523bbcb66017e6548d7f4f920e914aaf3dd242a949069596178af342b
|
Provenance
The following attestation bundles were made for sup-0.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
build.yml on 1st1/sup
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sup-0.1.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl -
Subject digest:
1116ca1f0a952c2a237260f0b0224ffe2c8c6c80307c841507a7cdd9b835dd49 - Sigstore transparency entry: 382062184
- Sigstore integration time:
-
Permalink:
1st1/sup@411b093bec2df5af803a29a33b672709e654c42e -
Branch / Tag:
refs/heads/master - Owner: https://github.com/1st1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@411b093bec2df5af803a29a33b672709e654c42e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file sup-0.1.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: sup-0.1.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 8.1 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a932648b7e05c4a45a4e19492119a16ff0a631e94e5ac09a0e15f39be1fa013b
|
|
| MD5 |
1a1d0688e61f4bbb847cd4c727d9f744
|
|
| BLAKE2b-256 |
461be05850e5e4d8ac37aa6586228ad2373d9054c6534d7ed07f48ae534b0a30
|
Provenance
The following attestation bundles were made for sup-0.1.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
build.yml on 1st1/sup
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sup-0.1.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl -
Subject digest:
a932648b7e05c4a45a4e19492119a16ff0a631e94e5ac09a0e15f39be1fa013b - Sigstore transparency entry: 382062120
- Sigstore integration time:
-
Permalink:
1st1/sup@411b093bec2df5af803a29a33b672709e654c42e -
Branch / Tag:
refs/heads/master - Owner: https://github.com/1st1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@411b093bec2df5af803a29a33b672709e654c42e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file sup-0.1.1-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: sup-0.1.1-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16f7deb5fac6196315151351c56a1bcf28e84482252594b62513f37e54d24614
|
|
| MD5 |
22fa20a3a6cc5f2796dabaf4cb504ae2
|
|
| BLAKE2b-256 |
c02ff1b78a69222ff5b51392e35440a2d1cc7f5706e5f77acbc468ff4990d9c2
|
Provenance
The following attestation bundles were made for sup-0.1.1-cp313-cp313-macosx_11_0_arm64.whl:
Publisher:
build.yml on 1st1/sup
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sup-0.1.1-cp313-cp313-macosx_11_0_arm64.whl -
Subject digest:
16f7deb5fac6196315151351c56a1bcf28e84482252594b62513f37e54d24614 - Sigstore transparency entry: 382062213
- Sigstore integration time:
-
Permalink:
1st1/sup@411b093bec2df5af803a29a33b672709e654c42e -
Branch / Tag:
refs/heads/master - Owner: https://github.com/1st1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@411b093bec2df5af803a29a33b672709e654c42e -
Trigger Event:
workflow_dispatch
-
Statement type: