Skip to main content

datasette-ripgrep

PyPI Changelog Tests License

Web interface for searching your code using ripgrep, built as a Datasette plugin

Demo

Try this plugin out at https://ripgrep.datasette.io/-/ripgrep - where you can run regular expression searches across the source code of Datasette and all of the datasette-* plugins belonging to the simonw GitHub user.

Some example searches:

Installation

Install this plugin in the same environment as Datasette.

$ datasette install datasette-ripgrep

The rg executable needs to be installed such that it can be run by this tool.

Usage

This plugin requires configuration: it needs to a path setting so that it knows where to run searches.

Create a metadata.json file that looks like this:

{
    "plugins": {
        "datasette-ripgrep": {
            "path": "/path/to/your/files"
        }
    }
}

Now run Datasette using datasette -m metadata.json. The plugin will add an interface at /-/ripgrep for running searches.

Plugin configuration

The "path" configuration is required. Optional extra configuration options are:

  • time_limit - floating point number. The rg process will be terminated if it takes longer than this limit. The default is one second, 1.0.
  • max_lines - integer. The rg process will be terminated if it returns more than this number of lines. The default is 2000.

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-ripgrep
python3 -mvenv venv
source venv/bin/activate

Or if you are using pipenv:

pipenv shell

Now install the dependencies and tests:

pip install -e '.[test]'

To run the tests:

pytest

Metadata

Release files for datasette-ripgrep 0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datasette-ripgrep 0.7
File Size Uploaded Provenance Actions
datasette-ripgrep-0.7.tar.gz 6.2 kB Without provenance Details for datasette-ripgrep-0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for datasette-ripgrep 0.7
File Interpreter ABI Platform Actions
datasette_ripgrep-0.7-py3-none-any.whl Python 3 none any Details for datasette_ripgrep-0.7-py3-none-any.whl

Total release size: 13.1 kB

Release files / datasette-ripgrep-0.7.tar.gz

Download URL datasette-ripgrep-0.7.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
684f416b37a89784f1a95368a7084ffceb5b0950c499a1e8c9aea27ebe0aa2fd
BLAKE2b-256 checksum
How to use checksums
1982366b8432d174baf0f361f2da3c2e0663360d519c0dbcc20e334a16b706ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release files / datasette_ripgrep-0.7-py3-none-any.whl

Download URL datasette_ripgrep-0.7-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a07258b947cd77185841e318304b0b634fbb1e88468ed2e025ab525272a21158
BLAKE2b-256 checksum
How to use checksums
3bda174db26382bcf91ed32da71123af692917e90ee1c7ea1ce148da32709772
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Security for datasette-ripgrep 0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page