Skip to main content

PaveDB — A lightweight, pluggable vector search microservice.

Project description

PatchVec — A lightweight, pluggable vector search microservice.

Upload → chunk → index (with metadata) → search via REST and CLI.

Highlights

  • Multi-tenant collections: /collections/{tenant}/{name}
  • Upload and search TXT, CSV, and PDF
  • Deterministic provenance: every hit returns doc id, page, offset, snippet
  • Metadata filters on search ({"filters": {"docid": "DOC-1"}})
  • REST and CLI entry points
  • Health/metrics endpoints + Prometheus exporter
  • Pluggable embeddings and stores; default stack is local FAISS + SBERT

Requirements

  • Python 3.10–3.14

Install (PyPI)

python -m venv .venv
source .venv/bin/activate
pip install patchvec

CPU-only deployments can use the PyTorch CPU wheel index:

pip install "patchvec[cpu]" \
  --index-url https://download.pytorch.org/whl/cpu \
  --extra-index-url https://pypi.org/simple

Quickstart

# Start the server (installed entry point)
pavesrv

# Or run with uvicorn manually if you prefer:
uvicorn pave.main:app --host 0.0.0.0 --port 8086

Auth defaults to none only for dev. For production, set static auth:

export PATCHVEC_AUTH__MODE=static
export PATCHVEC_AUTH__GLOBAL_KEY="your-secret"

Minimal config (optional)

By default PatchVec runs with sensible local defaults. For a user install, customize ~/patchvec/config.yml:

vector_store:
  type: faiss
embedder:
  type: sbert
auth:
  mode: static
  global_key: ${PATCHVEC_GLOBAL_KEY}

Then export:

export PATCHVEC_GLOBAL_KEY="your-secret"

If you keep the file elsewhere, point the runtime at it explicitly:

export PATCHVEC_CONFIG=/path/to/config.yml

CLI example

pavecli create-collection demo books
pavecli ingest demo books demo/20k_leagues.txt --docid=verne-20k \
  --metadata='{"lang":"en"}'
pavecli search demo books "captain nemo" -k 5

REST example

# Create a collection
curl -X POST http://localhost:8086/collections/demo/books \
  -H "Authorization: Bearer your-secret"

# Upload a TXT document
curl -X POST http://localhost:8086/collections/demo/books/documents \
  -H "Authorization: Bearer your-secret" \
  -F "file=@demo/20k_leagues.txt" -F "docid=verne-20k" \
  -F 'metadata={"lang":"en"}'

# Search (GET, no filters)
curl -G --data-urlencode "q=hello" \
  -H "Authorization: Bearer your-secret" \
  http://localhost:8086/collections/demo/books/search

# Search (POST, with filters)
curl -X POST http://localhost:8086/collections/demo/books/search \
  -H "Authorization: Bearer your-secret" \
  -H "Content-Type: application/json" \
  -d '{"q":"captain nemo","k":5,"filters":{"docid":"verne-20k"}}'

License

AGPL-3.0-or-later — (C) 2025, 2026 Rodrigo Rodrigues da Silva rodrigo@flowlexi.com

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

patchvec-0.5.9.tar.gz (114.8 kB view details)

Uploaded Source

Built Distribution

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

patchvec-0.5.9-py3-none-any.whl (86.7 kB view details)

Uploaded Python 3

File details

Details for the file patchvec-0.5.9.tar.gz.

File metadata

  • Download URL: patchvec-0.5.9.tar.gz
  • Upload date:
  • Size: 114.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for patchvec-0.5.9.tar.gz
Algorithm Hash digest
SHA256 cbd4fa78df77efdcc57a201238a2a8674683fc68c29c1b04354fcc6b4bc2fa41
MD5 778098e98396f70adb2e47062c794503
BLAKE2b-256 f22970fe1279974dbf9b9bdf0c0e73788f1c3bab7d37cca1662f9eacc42c6030

See more details on using hashes here.

File details

Details for the file patchvec-0.5.9-py3-none-any.whl.

File metadata

  • Download URL: patchvec-0.5.9-py3-none-any.whl
  • Upload date:
  • Size: 86.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for patchvec-0.5.9-py3-none-any.whl
Algorithm Hash digest
SHA256 558017a6336eb7d4d854a51e0ce13ad9ec6a45758f86724b9cb8b4b205a3bc62
MD5 a8a255ec36dece514727d1e2fe9ec6d3
BLAKE2b-256 a1165c3d5270cbeccb28ca43bcb24a956df87ad837ecfc82407a01a2f77b901b

See more details on using hashes here.

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