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.3.tar.gz (20.4 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.3-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vgrep-0.1.3.tar.gz
  • Upload date:
  • Size: 20.4 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.3.tar.gz
Algorithm Hash digest
SHA256 0fca02a5486081dd7d073aa92ef8c11ed9e61a079d54cd0ec03ae69a0dbd24b5
MD5 b3cddacd0f8e3da4415d7891abfe6c70
BLAKE2b-256 2f8d21881c489356d7846c7761eeeed0129e888f2d2f94d3815f0f71e5ef9ded

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: vgrep-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 22.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c2ca7376bd3917e31b67de0999a59f0b943dded92dce06baba5e30ef6bd01313
MD5 bcf007db0967cbbf600d93eab20dff01
BLAKE2b-256 90bbbf2b2b734c92a209b7b922bff6ab41e78bcf531752af6dd3288c902af2a6

See more details on using hashes here.

Provenance

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