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.4.tar.gz (20.9 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.4-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vgrep-0.1.4.tar.gz
  • Upload date:
  • Size: 20.9 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.4.tar.gz
Algorithm Hash digest
SHA256 d7fdd40b517af080f2f21f7d2f7ec5b58b416ef1a7ace5c1a10787fc49afc58a
MD5 bc001c7653a45c13ebf16545f184f248
BLAKE2b-256 681ba485b50743170891cc0811c27d21f02d3e39b827dbc621443de9088a36b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for vgrep-0.1.4.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.4-py3-none-any.whl.

File metadata

  • Download URL: vgrep-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 23.1 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6eb2340c83bdd89f75c927f982396ba5fb6b38ca4b2c9d42c1658687c1c9757b
MD5 47083ae09a3d2a0c80d77579078e13b9
BLAKE2b-256 5b8d9756e95c63b4909df19a32031d9c0acc7479bc549f30d255f4ee25029d28

See more details on using hashes here.

Provenance

The following attestation bundles were made for vgrep-0.1.4-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