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.2.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.2-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vgrep-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 ff34a70334bb64eeb2ed7060513ae5fe897c0cd85a390793e789284d0f658216
MD5 ae0924b63eb5bf135ee2821ca480d8cd
BLAKE2b-256 5a968cfaa935b9f4d817e15c4b5f4d855717f8ae9b3b52c97e1a26868c101bb1

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: vgrep-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 22.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c114d7ce711bf29715a248d61f09f65feb64d73a30556c8416199dfcf5101e2c
MD5 a9ef744acd899844182d767037025bae
BLAKE2b-256 bba60b26b86af4ab1e052386cc0de4819376eb30491221e3f4bee2fd042093a4

See more details on using hashes here.

Provenance

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