Skip to main content

Vector-based grep tool

Project description

#+title: Vector-Grep
Sync your DB to a vector DB and perform queries.

* Installation
Install the published package with [[https://pip.pypa.io/en/stable/][pip]]:
#+begin_src shell
pip install vgrep
#+end_src

To build and install locally:
#+begin_src shell
python -m build
pip install dist/vgrep-*.whl
#+end_src

* Publishing
Releases are published to [[https://pypi.org/][PyPI]] automatically via GitHub Actions when a
GitHub release is created. Configure the repository with a
``PYPI_API_TOKEN`` secret and the workflow will build and upload the
distribution for you.

* Usage
** Command line
Sync the database with tracked folders or search for text:
#+begin_src shell
vgrep /path/to/dir --sync --match '*.org'
vgrep /path/to/dir --query "search text" --match "*.org"
#+end_src

** Library
Interact with the index programmatically using the ``Manager``:
#+begin_src python
from pathlib import Path
from vgrep.manager import Manager

mgr = Manager(Path("/my/notes"), file_match=lambda p: p.suffix == ".org")
mgr.sync()
results = mgr.query("needle")
#+end_src

* Development
Install the dependencies

#+begin_src shell
pip install -r requirements.txt
#+end_src

Run the tests with:

#+begin_src shell
pytest
#+end_src

Install the package in editable mode so Emacs/Elpy can discover the modules:

#+begin_src shell
pip install -e .
#+end_src

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

vgrep-0.1.1.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

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

vgrep-0.1.1-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

Details for the file vgrep-0.1.1.tar.gz.

File metadata

  • Download URL: vgrep-0.1.1.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for vgrep-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4e69b3ecb9cc6073898c86a8ca0625b61f145d5ad8fc5cec7e59a847babc732e
MD5 f73872133a7a09d68c197c5eabd11e34
BLAKE2b-256 3c64844164d98eb682793609bf45e14fdb81c6682d4f114a2f344441fa238335

See more details on using hashes here.

Provenance

The following attestation bundles were made for vgrep-0.1.1.tar.gz:

Publisher: publish.yml on pierrel/vgrep

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

File details

Details for the file vgrep-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: vgrep-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 22.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for vgrep-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8347172bb558e34ee879259ea51d5596b41e66e560eef8bc87d602ae8542c024
MD5 23268fcec287d925bfb111402eae7759
BLAKE2b-256 a8036f6152ae89d16e8837aeeb07bdedef03a1e2317ad2150d10f8731c6a8916

See more details on using hashes here.

Provenance

The following attestation bundles were made for vgrep-0.1.1-py3-none-any.whl:

Publisher: publish.yml on pierrel/vgrep

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