Skip to main content

A GPU-accelerated grep tool built with cuDF.

Project description

PyCuGrep

PyCuGrep is a Python package that provides a GPU-accelerated grep utility, leveraging the power of NVIDIA GPUs and the cuDF library from RAPIDS. It's designed for rapidly searching large text files or datasets by offloading the pattern matching to the GPU, significantly speeding up operations compared to traditional CPU-based grep for suitable workloads.

Features

  • GPU Accelerated: Utilizes cuDF for high-performance string matching on NVIDIA GPUs.
  • Regex Support: Supports standard regular expressions for flexible pattern matching.
  • Case Insensitive Search: Option to perform case-insensitive searches.
  • Invert Match: Find lines that do not match the pattern.
  • Line Numbers: Display line numbers for matched (or non-matched) lines.
  • Count Only: Only output the count of matching lines.

Installation

To install pycugrep, you'll need a system with an NVIDIA GPU and CUDA installed. It's recommended to install via pip:

pip install pycugrep

Usage

PyCuGrep can be used directly from the command line after installation:

cugrep [OPTIONS] PATTERN FILE...

Example: Basic search

cugrep "error" /path/to/logfile.txt

Example: Case-insensitive search across multiple files

cugrep -i "warning" file1.txt file2.txt

Example: Count only, inverted match

cugrep -c -v "success" all_logs.txt

For more details on available options, run cugrep --help.

Development

For local development, after cloning the repository, navigate to the python/ directory and install in editable mode:

cd cugrep/python
pip install -e .

License

PyCuGrep is licensed under the Apache 2.0 License. See the LICENSE file for more details.

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

pycugrep-0.1.2.tar.gz (94.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycugrep-0.1.2-py3-none-any.whl (93.9 kB view details)

Uploaded Python 3

File details

Details for the file pycugrep-0.1.2.tar.gz.

File metadata

  • Download URL: pycugrep-0.1.2.tar.gz
  • Upload date:
  • Size: 94.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pycugrep-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6028ae009359a356fe6732f0d8ca05166b7fca4b6f977549ebbd62fe2cbd7943
MD5 f475cee9ede5709da5a1bb22c233d141
BLAKE2b-256 d80fc1a056a58f74012b181dcf8a5a162ba9ff9922773645ea8014f890258a62

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycugrep-0.1.2.tar.gz:

Publisher: pypi_release.yml on loghijiaha/cugrep

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pycugrep-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pycugrep-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 93.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pycugrep-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9e2c54d802fdc4d530df68206754c3d35bbb3efb4836f4051ddfbd6cb8541569
MD5 b94aa723467362b8e6e0cf2a3d7795dc
BLAKE2b-256 9b4b8ac439659dd7ef163e6daa5dbdd17cfdedecc2cd642ff93299e2a6e74be1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycugrep-0.1.2-py3-none-any.whl:

Publisher: pypi_release.yml on loghijiaha/cugrep

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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