Patchvec — 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
- Chunking per format:
- PDF → 1 chunk/page
- TXT → configurable chunk size + overlap
- CSV → 1 chunk/row
- Metadata filters on POST search (
{"filters": {"docid": "DOC-1"}}) - Health, metrics, and Prometheus endpoints
- Configurable auth modes:
noneorstatic(Bearer) - Default backends are local (vendor-neutral "default"); embedders & stores are pluggable
Requirements
- Python 3.10+
Install
python -m venv .venv
source .venv/bin/activate
pip install patchvec
CPU-only by default. If you have a CUDA setup and want GPU-accelerated deps, install the GPU-enabled packages in your environment before running PatchVec.
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 8080
Minimal config (optional)
By default PatchVec runs with sensible local defaults. To customize, create config.yml and set:
vector_store:
type: default
embedder:
type: default
auth:
mode: none # or 'static' with per-tenant Bearer keys
Then export:
export PATCHVEC_CONFIG=./config.yml
REST example
# Create a collection
curl -X POST http://localhost:8080/collections/acme/docs
# Upload a TXT document
curl -X POST http://localhost:8080/collections/acme/docs/documents -F "file=@sample.txt" -F "docid=DOC1"
# Search (GET, no filters)
curl -G --data-urlencode "q=hello" http://localhost:8080/collections/acme/docs/search
# Search (POST, with filters)
curl -X POST http://localhost:8080/collections/acme/docs/search -H "Content-Type: application/json" -d '{"q":"hello","k":5,"filters":{"docid":"DOC1"}}'
License
GPL-3.0-or-later — (C) 2025 Rodrigo Rodrigues da Silva
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file patchvec-0.5.6.tar.gz.
File metadata
- Download URL: patchvec-0.5.6.tar.gz
- Upload date:
- Size: 47.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3388ce19245400b2a53126b0aeda062e4d119b484ed886f31dd4671b44f41c89
|
|
| MD5 |
9f3dcfb60fd70c28adfba56858006b7d
|
|
| BLAKE2b-256 |
02e3a0db0802d417c5ed030fdce272ed7ba81495a58af71302094d3f3ce8faee
|
File details
Details for the file patchvec-0.5.6-py3-none-any.whl.
File metadata
- Download URL: patchvec-0.5.6-py3-none-any.whl
- Upload date:
- Size: 40.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f89ccb243d13431a516144791d5e1af9b1a678d93c5e697f1158425c0854b487
|
|
| MD5 |
30a9a7f3ffed097102d1416f33eb8c0b
|
|
| BLAKE2b-256 |
91aed5af804833501e59321871979a97b192adda21e9b643465e8b61ed6a793e
|