Practical overview
When it fits
Use Vectorwrap when an application already produces embeddings and needs a common Python interface for storing and querying them across supported databases.
Who it is for
- Python developers adding embedding retrieval to applications.
- Teams building RAG systems that need vector search behind an existing or changeable database backend.
- Developers prototyping vector search locally before moving to another supported database.
Documented uses
- Store and update vectors with optional metadata.
- Retrieve the nearest vectors by query embedding, with optional filtering.
- Change a project's vector-search backend through a shared interface.
Requirements & limits
The repository is public and lists an MIT license. The documented installation uses pip.
- PostgreSQL support requires pgvector; SQLite requires loadable extensions.
- ClickHouse vector similarity indexes require version 25.8 or later and an experimental feature enabled.
- Older MySQL versions use JSON arrays with Python-based distance calculations instead of native vector storage.
- The application must provide an embedding function and vectors.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up a vector collection and query embeddings
Install Vectorwrap for a supported backend, then use its documented API to store and retrieve vectors.
Before you start
- A Python environment and a supported database with a connection string.
- An embedding function that returns vectors.
- Backend-specific prerequisites: PostgreSQL requires pgvector; SQLite requires loadable extensions; DuckDB and ClickHouse use their respective Vectorwrap extras. ClickHouse vector similarity indexes require version 25.8 or later with the experimental feature enabled.
Steps
Install
vectorwrapfor PostgreSQL or MySQL; add the documentedsqlite,duckdb, orclickhouseextra for those backends.Import
VectorDBand connect with the chosen backend’s connection string.Call
create_collectionwith a collection name and vector dimension.Use
upsertto store a vector and optional metadata, then callquerywith a query vector, result count and optional filter.
Expected outcome
A collection can hold embedding vectors and metadata, and a similarity query returns matching IDs and distances.
Guide limitations
- Vectorwrap accepts vectors from an application-provided embedding function; it does not supply the embeddings.
- Backend requirements and filtering behavior vary; SQLite filtering uses adaptive oversampling, while PostgreSQL and MySQL use native SQL filtering.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 16 October 2026
- Original website title
- mihirahuja1/vectorwrap · Official homepage title · retained in its source language

