vectorwrap


Namevectorwrap JSON
Version 0.6.0 PyPI version JSON
download
home_pageNone
SummaryUniversal vector search wrapper for Postgres, MySQL, SQLite, DuckDB, ClickHouse (pgvector, HeatWave, sqlite-vss, DuckDB VSS, ClickHouse ANN)
upload_time2025-10-09 05:48:14
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords vector database embeddings similarity search postgresql mysql sqlite duckdb clickhouse
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # vectorwrap 0.6.0

<p align="center">
  <a href="https://pypi.org/project/vectorwrap"><img src="https://img.shields.io/pypi/v/vectorwrap.svg" alt="PyPI"></a>
  <a href="https://github.com/mihirahuja1/vectorwrap/stargazers"><img src="https://img.shields.io/github/stars/mihirahuja1/vectorwrap?style=social" alt="GitHub Stars"></a>
  <a href="https://github.com/mihirahuja1/vectorwrap/actions/workflows/ci.yml"><img src="https://github.com/mihirahuja1/vectorwrap/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
  <a href="https://codecov.io/gh/mihirahuja1/vectorwrap"><img src="https://codecov.io/gh/mihirahuja1/vectorwrap/branch/main/graph/badge.svg" alt="Coverage"></a>
</p>

<p align="center">
  <img src="examples/vectorwrapdemo.gif" width="600" alt="SQLite→Postgres swap demo">
</p>

Universal vector search wrapper for Postgres, MySQL, SQLite, DuckDB, ClickHouse (pgvector, HeatWave, sqlite-vss, DuckDB VSS, ClickHouse ANN).

Switch between PostgreSQL, MySQL, SQLite, DuckDB, and ClickHouse vector backends with a single line of code. Perfect for prototyping, testing, and production deployments.

**Stable API** - Core methods follow semantic versioning with backward compatibility guarantees.

## Quick Start

[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mihirahuja1/vectorwrap/blob/HEAD/examples/demo_notebook.ipynb)

```bash
# Core install (PostgreSQL + MySQL support)
pip install vectorwrap

# Add SQLite support (requires system SQLite with extension support)
pip install "vectorwrap[sqlite]"

# Add DuckDB support (includes VSS extension)
pip install "vectorwrap[duckdb]"

# Add ClickHouse support (includes clickhouse-connect)
pip install "vectorwrap[clickhouse]"

# Install all backends for development
pip install "vectorwrap[sqlite,duckdb,clickhouse]"
```

```python
from vectorwrap import VectorDB

# Your embedding function (use OpenAI, Hugging Face, etc.)
def embed(text: str) -> list[float]:
    # Return your 1536-dim embeddings here
    return [0.1, 0.2, ...] 

# Connect to any supported database
db = VectorDB("postgresql://user:pass@host/db")  # or mysql://... or sqlite:///path.db or duckdb:///path.db or clickhouse://...
db.create_collection("products", dim=1536)

# Insert vectors with metadata
db.upsert("products", 1, embed("Apple iPhone 15 Pro"), {"category": "phone", "price": 999})
db.upsert("products", 2, embed("Samsung Galaxy S24"), {"category": "phone", "price": 899})

# Semantic search with filtering
results = db.query(
    collection="products",
    query_vector=embed("latest smartphone"),
    top_k=5,
    filter={"category": "phone"}
)
print(results)  # → [(1, 0.023), (2, 0.087)]
```

## Supported Backends

| Database | Vector Type | Indexing | Installation | Notes |
|----------|-------------|----------|--------------|-------|
| **PostgreSQL 16+ + pgvector** | `VECTOR(n)` | HNSW | `CREATE EXTENSION vector;` | Production ready |
| **MySQL 8.2+ HeatWave** | `VECTOR(n)` | Automatic | Built-in | Native vector support |
| **MySQL ≤8.0 (legacy)** | JSON arrays | None | Built-in | Slower, Python distance |
| **SQLite + sqlite-vss** | Virtual table | HNSW | `pip install "vectorwrap[sqlite]"` | Great for prototyping |
| **DuckDB + VSS**  | `FLOAT[]` arrays | HNSW | `pip install "vectorwrap[duckdb]"` | Analytics + vectors |
| **ClickHouse**  | `Array(Float32)` | HNSW | `pip install "vectorwrap[clickhouse]"` | High-performance analytics |

## Examples

### Complete Example with OpenAI Embeddings

```python
from openai import OpenAI
from vectorwrap import VectorDB

client = OpenAI()

def embed(text: str) -> list[float]:
    response = client.embeddings.create(
        model="text-embedding-3-small",
        input=text
    )
    return response.data[0].embedding

# Use any database - just change the connection string!
db = VectorDB("postgresql://user:pass@localhost/vectors")
db.create_collection("documents", dim=1536)

# Add some documents
documents = [
    ("Python is a programming language", {"topic": "programming"}),
    ("Machine learning uses neural networks", {"topic": "ai"}),
    ("Databases store structured data", {"topic": "data"}),
]

for i, (text, metadata) in enumerate(documents):
    db.upsert("documents", i, embed(text), metadata)

# Search for similar content
query = "What is artificial intelligence?"
results = db.query("documents", embed(query), top_k=2)

for doc_id, distance in results:
    print(f"Document {doc_id}: distance={distance:.3f}")
```

### Database-Specific Connection Strings

```python
# PostgreSQL with pgvector
db = VectorDB("postgresql://user:password@localhost:5432/mydb")

# MySQL (8.2+ with native vectors or legacy JSON mode)  
db = VectorDB("mysql://user:password@localhost:3306/mydb")

# SQLite (local file or in-memory)
db = VectorDB("sqlite:///./vectors.db")
db = VectorDB("sqlite:///:memory:")

# DuckDB (local file or in-memory)
db = VectorDB("duckdb:///./vectors.db")
db = VectorDB("duckdb:///:memory:")

# ClickHouse (local or remote)
db = VectorDB("clickhouse://default@localhost:8123/default")
db = VectorDB("clickhouse://user:password@host:port/database")
```

## API Reference

### `VectorDB(connection_string: str)` - **Stable**
Create a vector database connection.

### `create_collection(name: str, dim: int)` - **Stable**
Create a new collection for vectors of dimension `dim`.

### `upsert(collection: str, id: int, vector: list[float], metadata: dict = None)` - **Stable**
Insert or update a vector with optional metadata.

### `query(collection: str, query_vector: list[float], top_k: int = 5, filter: dict = None)` - **Stable**
Find the `top_k` most similar vectors. Returns list of `(id, distance)` tuples.

**Filtering Support:**
- PostgreSQL & MySQL: Native SQL filtering
- SQLite: Adaptive oversampling (fetches more results, then filters)
- DuckDB: Native JSON filtering with SQL predicates
- ClickHouse: Native JSON filtering with JSONExtract functions

## API Stability

**vectorwrap follows [semantic versioning](https://semver.org/) and maintains API stability:**

### **Stable APIs** (No breaking changes in minor versions)
- **Core Interface**: `VectorDB()` constructor and connection string format
- **Collection Management**: `create_collection(name, dim)`
- **Data Operations**: `upsert(collection, id, vector, metadata)` and `query(collection, query_vector, top_k, filter)`
- **Return Formats**: Query results as `[(id, distance), ...]` tuples

### **Evolving APIs** (May change in minor versions with deprecation warnings)
- **Backend-specific optimizations**: Index configuration, distance metrics
- **Advanced filtering**: Complex filter syntax beyond simple key-value pairs
- **Batch operations**: Bulk insert/update methods (planned)

### **Experimental** (May change without notice)
- **New backends**: Recently added database support may have API refinements
- **Extension methods**: Database-specific functionality not in core API

### **Version Compatibility Promise**
- **Patch versions** (0.3.1 → 0.3.2): Only bug fixes, no API changes
- **Minor versions** (0.3.x → 0.4.0): New features, deprecated APIs get warnings
- **Major versions** (0.x → 1.0): Breaking changes allowed, migration guide provided

**Current Status**: `v0.4.0` - **Stable release** with API backward compatibility guarantees

## Installation Notes

### SQLite Setup
SQLite support requires loadable extensions. On some systems you may need:

```bash
# macOS with Homebrew
brew install sqlite
export LDFLAGS="-L$(brew --prefix sqlite)/lib"
export CPPFLAGS="-I$(brew --prefix sqlite)/include"
pip install "vectorwrap[sqlite]"

# Or use system package manager
# Ubuntu: apt install libsqlite3-dev
# CentOS: yum install sqlite-devel
```

### PostgreSQL Setup
```sql
-- Enable pgvector extension
CREATE EXTENSION IF NOT EXISTS vector;
```

### MySQL Setup
MySQL 8.2+ has native `VECTOR` type support. For older versions, vectorwrap automatically falls back to JSON storage with Python-based distance calculations.

### DuckDB Setup
DuckDB includes the VSS extension by default since v0.10.2. The extension provides HNSW indexing for fast vector similarity search:

```python
# Works out of the box with vectorwrap[duckdb]
db = VectorDB("duckdb:///analytics.db")
db.create_collection("embeddings", dim=1536)  # Auto-creates HNSW index
```

### ClickHouse Setup
ClickHouse provides native support for vector similarity search using ANN indexes:

```python
# Works with vectorwrap[clickhouse]
db = VectorDB("clickhouse://default@localhost:8123/default")
db.create_collection("embeddings", dim=1536)  # Auto-creates HNSW index
```

Note: ClickHouse vector similarity indexes require ClickHouse version 25.8+ with the experimental feature enabled. The backend automatically handles this configuration.

## Use Cases

- **Prototyping**: Start with SQLite or DuckDB, scale to PostgreSQL or ClickHouse
- **Testing**: Use in-memory databases (SQLite/DuckDB) for fast tests
- **Analytics**: DuckDB or ClickHouse for combining vector search with analytical queries
- **Multi-tenant**: Different customers on different database backends
- **Migration**: Move vector data between database systems seamlessly
- **Hybrid deployments**: PostgreSQL for production, DuckDB/ClickHouse for analytics
- **High-performance**: ClickHouse for large-scale vector search workloads

## Integrations

vectorwrap integrates with popular AI frameworks and vector databases:

- **LangChain**: Drop-in VectorStore adapter for RAG pipelines
- **LlamaIndex**: VectorStore wrapper for data frameworks
- **Supabase**: Managed PostgreSQL + pgvector helper
- **Milvus**: Enterprise vector database adapter
- **Qdrant**: Cloud-native vector search integration

```bash
# Install with integrations
pip install "vectorwrap[langchain]"
pip install "vectorwrap[llamaindex]"
pip install "vectorwrap[milvus]"
pip install "vectorwrap[qdrant]"
```

**Example with LangChain:**
```python
from langchain.embeddings import OpenAIEmbeddings
from vectorwrap.integrations.langchain import VectorwrapStore

embeddings = OpenAIEmbeddings()
vectorstore = VectorwrapStore(
    connection_url="postgresql://user:pass@localhost/db",
    collection_name="documents",
    embedding_function=embeddings
)

vectorstore.add_texts(["Hello world", "LangChain + vectorwrap"])
results = vectorstore.similarity_search("greeting", k=5)
```

See [docs/INTEGRATIONS.md](docs/INTEGRATIONS.md) for complete integration guide.

## Benchmarks

Comprehensive performance benchmarks are available in the [`bench/`](bench/) directory.

**Quick benchmark:**
```bash
pip install "vectorwrap[all]" matplotlib
python bench/benchmark.py
python bench/visualize.py benchmark_results.json
```

See [bench/README.md](bench/README.md) for detailed benchmarking guide.

## Roadmap

### v1.0 Stable Release
- **API Freeze**: Lock stable APIs with full backward compatibility
- **Production Testing**: Comprehensive benchmarks across all backends [DONE]
- **Documentation**: Complete API docs and migration guides

### Future Features
- **Redis** with RediSearch
- **Elasticsearch** with dense vector fields
- **Qdrant** and **Weaviate** support
- **Batch operations** for bulk inserts
- **Index configuration** options
- **Distance metrics**: Cosine, dot product, custom functions

## License

MIT © 2025 Mihir Ahuja

---

If **vectorwrap** saved you time, please **star the repo** – it helps others discover it!

**[PyPI Package](https://pypi.org/project/vectorwrap/) • [GitHub Repository](https://github.com/mihirahuja/vectorwrap) • [Report Issues](https://github.com/mihirahuja/vectorwrap/issues)**

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "vectorwrap",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "vector, database, embeddings, similarity, search, postgresql, mysql, sqlite, duckdb, clickhouse",
    "author": null,
    "author_email": "Mihir Ahuja <mihir@example.com>",
    "download_url": "https://files.pythonhosted.org/packages/0d/a0/2107da9b50cd32e9508b9b03c5233834afaf5c21e3ae55bd5e3b154e7658/vectorwrap-0.6.0.tar.gz",
    "platform": null,
    "description": "# vectorwrap 0.6.0\n\n<p align=\"center\">\n  <a href=\"https://pypi.org/project/vectorwrap\"><img src=\"https://img.shields.io/pypi/v/vectorwrap.svg\" alt=\"PyPI\"></a>\n  <a href=\"https://github.com/mihirahuja1/vectorwrap/stargazers\"><img src=\"https://img.shields.io/github/stars/mihirahuja1/vectorwrap?style=social\" alt=\"GitHub Stars\"></a>\n  <a href=\"https://github.com/mihirahuja1/vectorwrap/actions/workflows/ci.yml\"><img src=\"https://github.com/mihirahuja1/vectorwrap/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"></a>\n  <a href=\"https://codecov.io/gh/mihirahuja1/vectorwrap\"><img src=\"https://codecov.io/gh/mihirahuja1/vectorwrap/branch/main/graph/badge.svg\" alt=\"Coverage\"></a>\n</p>\n\n<p align=\"center\">\n  <img src=\"examples/vectorwrapdemo.gif\" width=\"600\" alt=\"SQLite\u2192Postgres swap demo\">\n</p>\n\nUniversal vector search wrapper for Postgres, MySQL, SQLite, DuckDB, ClickHouse (pgvector, HeatWave, sqlite-vss, DuckDB VSS, ClickHouse ANN).\n\nSwitch between PostgreSQL, MySQL, SQLite, DuckDB, and ClickHouse vector backends with a single line of code. Perfect for prototyping, testing, and production deployments.\n\n**Stable API** - Core methods follow semantic versioning with backward compatibility guarantees.\n\n## Quick Start\n\n[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mihirahuja1/vectorwrap/blob/HEAD/examples/demo_notebook.ipynb)\n\n```bash\n# Core install (PostgreSQL + MySQL support)\npip install vectorwrap\n\n# Add SQLite support (requires system SQLite with extension support)\npip install \"vectorwrap[sqlite]\"\n\n# Add DuckDB support (includes VSS extension)\npip install \"vectorwrap[duckdb]\"\n\n# Add ClickHouse support (includes clickhouse-connect)\npip install \"vectorwrap[clickhouse]\"\n\n# Install all backends for development\npip install \"vectorwrap[sqlite,duckdb,clickhouse]\"\n```\n\n```python\nfrom vectorwrap import VectorDB\n\n# Your embedding function (use OpenAI, Hugging Face, etc.)\ndef embed(text: str) -> list[float]:\n    # Return your 1536-dim embeddings here\n    return [0.1, 0.2, ...] \n\n# Connect to any supported database\ndb = VectorDB(\"postgresql://user:pass@host/db\")  # or mysql://... or sqlite:///path.db or duckdb:///path.db or clickhouse://...\ndb.create_collection(\"products\", dim=1536)\n\n# Insert vectors with metadata\ndb.upsert(\"products\", 1, embed(\"Apple iPhone 15 Pro\"), {\"category\": \"phone\", \"price\": 999})\ndb.upsert(\"products\", 2, embed(\"Samsung Galaxy S24\"), {\"category\": \"phone\", \"price\": 899})\n\n# Semantic search with filtering\nresults = db.query(\n    collection=\"products\",\n    query_vector=embed(\"latest smartphone\"),\n    top_k=5,\n    filter={\"category\": \"phone\"}\n)\nprint(results)  # \u2192 [(1, 0.023), (2, 0.087)]\n```\n\n## Supported Backends\n\n| Database | Vector Type | Indexing | Installation | Notes |\n|----------|-------------|----------|--------------|-------|\n| **PostgreSQL 16+ + pgvector** | `VECTOR(n)` | HNSW | `CREATE EXTENSION vector;` | Production ready |\n| **MySQL 8.2+ HeatWave** | `VECTOR(n)` | Automatic | Built-in | Native vector support |\n| **MySQL \u22648.0 (legacy)** | JSON arrays | None | Built-in | Slower, Python distance |\n| **SQLite + sqlite-vss** | Virtual table | HNSW | `pip install \"vectorwrap[sqlite]\"` | Great for prototyping |\n| **DuckDB + VSS**  | `FLOAT[]` arrays | HNSW | `pip install \"vectorwrap[duckdb]\"` | Analytics + vectors |\n| **ClickHouse**  | `Array(Float32)` | HNSW | `pip install \"vectorwrap[clickhouse]\"` | High-performance analytics |\n\n## Examples\n\n### Complete Example with OpenAI Embeddings\n\n```python\nfrom openai import OpenAI\nfrom vectorwrap import VectorDB\n\nclient = OpenAI()\n\ndef embed(text: str) -> list[float]:\n    response = client.embeddings.create(\n        model=\"text-embedding-3-small\",\n        input=text\n    )\n    return response.data[0].embedding\n\n# Use any database - just change the connection string!\ndb = VectorDB(\"postgresql://user:pass@localhost/vectors\")\ndb.create_collection(\"documents\", dim=1536)\n\n# Add some documents\ndocuments = [\n    (\"Python is a programming language\", {\"topic\": \"programming\"}),\n    (\"Machine learning uses neural networks\", {\"topic\": \"ai\"}),\n    (\"Databases store structured data\", {\"topic\": \"data\"}),\n]\n\nfor i, (text, metadata) in enumerate(documents):\n    db.upsert(\"documents\", i, embed(text), metadata)\n\n# Search for similar content\nquery = \"What is artificial intelligence?\"\nresults = db.query(\"documents\", embed(query), top_k=2)\n\nfor doc_id, distance in results:\n    print(f\"Document {doc_id}: distance={distance:.3f}\")\n```\n\n### Database-Specific Connection Strings\n\n```python\n# PostgreSQL with pgvector\ndb = VectorDB(\"postgresql://user:password@localhost:5432/mydb\")\n\n# MySQL (8.2+ with native vectors or legacy JSON mode)  \ndb = VectorDB(\"mysql://user:password@localhost:3306/mydb\")\n\n# SQLite (local file or in-memory)\ndb = VectorDB(\"sqlite:///./vectors.db\")\ndb = VectorDB(\"sqlite:///:memory:\")\n\n# DuckDB (local file or in-memory)\ndb = VectorDB(\"duckdb:///./vectors.db\")\ndb = VectorDB(\"duckdb:///:memory:\")\n\n# ClickHouse (local or remote)\ndb = VectorDB(\"clickhouse://default@localhost:8123/default\")\ndb = VectorDB(\"clickhouse://user:password@host:port/database\")\n```\n\n## API Reference\n\n### `VectorDB(connection_string: str)` - **Stable**\nCreate a vector database connection.\n\n### `create_collection(name: str, dim: int)` - **Stable**\nCreate a new collection for vectors of dimension `dim`.\n\n### `upsert(collection: str, id: int, vector: list[float], metadata: dict = None)` - **Stable**\nInsert or update a vector with optional metadata.\n\n### `query(collection: str, query_vector: list[float], top_k: int = 5, filter: dict = None)` - **Stable**\nFind the `top_k` most similar vectors. Returns list of `(id, distance)` tuples.\n\n**Filtering Support:**\n- PostgreSQL & MySQL: Native SQL filtering\n- SQLite: Adaptive oversampling (fetches more results, then filters)\n- DuckDB: Native JSON filtering with SQL predicates\n- ClickHouse: Native JSON filtering with JSONExtract functions\n\n## API Stability\n\n**vectorwrap follows [semantic versioning](https://semver.org/) and maintains API stability:**\n\n### **Stable APIs** (No breaking changes in minor versions)\n- **Core Interface**: `VectorDB()` constructor and connection string format\n- **Collection Management**: `create_collection(name, dim)`\n- **Data Operations**: `upsert(collection, id, vector, metadata)` and `query(collection, query_vector, top_k, filter)`\n- **Return Formats**: Query results as `[(id, distance), ...]` tuples\n\n### **Evolving APIs** (May change in minor versions with deprecation warnings)\n- **Backend-specific optimizations**: Index configuration, distance metrics\n- **Advanced filtering**: Complex filter syntax beyond simple key-value pairs\n- **Batch operations**: Bulk insert/update methods (planned)\n\n### **Experimental** (May change without notice)\n- **New backends**: Recently added database support may have API refinements\n- **Extension methods**: Database-specific functionality not in core API\n\n### **Version Compatibility Promise**\n- **Patch versions** (0.3.1 \u2192 0.3.2): Only bug fixes, no API changes\n- **Minor versions** (0.3.x \u2192 0.4.0): New features, deprecated APIs get warnings\n- **Major versions** (0.x \u2192 1.0): Breaking changes allowed, migration guide provided\n\n**Current Status**: `v0.4.0` - **Stable release** with API backward compatibility guarantees\n\n## Installation Notes\n\n### SQLite Setup\nSQLite support requires loadable extensions. On some systems you may need:\n\n```bash\n# macOS with Homebrew\nbrew install sqlite\nexport LDFLAGS=\"-L$(brew --prefix sqlite)/lib\"\nexport CPPFLAGS=\"-I$(brew --prefix sqlite)/include\"\npip install \"vectorwrap[sqlite]\"\n\n# Or use system package manager\n# Ubuntu: apt install libsqlite3-dev\n# CentOS: yum install sqlite-devel\n```\n\n### PostgreSQL Setup\n```sql\n-- Enable pgvector extension\nCREATE EXTENSION IF NOT EXISTS vector;\n```\n\n### MySQL Setup\nMySQL 8.2+ has native `VECTOR` type support. For older versions, vectorwrap automatically falls back to JSON storage with Python-based distance calculations.\n\n### DuckDB Setup\nDuckDB includes the VSS extension by default since v0.10.2. The extension provides HNSW indexing for fast vector similarity search:\n\n```python\n# Works out of the box with vectorwrap[duckdb]\ndb = VectorDB(\"duckdb:///analytics.db\")\ndb.create_collection(\"embeddings\", dim=1536)  # Auto-creates HNSW index\n```\n\n### ClickHouse Setup\nClickHouse provides native support for vector similarity search using ANN indexes:\n\n```python\n# Works with vectorwrap[clickhouse]\ndb = VectorDB(\"clickhouse://default@localhost:8123/default\")\ndb.create_collection(\"embeddings\", dim=1536)  # Auto-creates HNSW index\n```\n\nNote: ClickHouse vector similarity indexes require ClickHouse version 25.8+ with the experimental feature enabled. The backend automatically handles this configuration.\n\n## Use Cases\n\n- **Prototyping**: Start with SQLite or DuckDB, scale to PostgreSQL or ClickHouse\n- **Testing**: Use in-memory databases (SQLite/DuckDB) for fast tests\n- **Analytics**: DuckDB or ClickHouse for combining vector search with analytical queries\n- **Multi-tenant**: Different customers on different database backends\n- **Migration**: Move vector data between database systems seamlessly\n- **Hybrid deployments**: PostgreSQL for production, DuckDB/ClickHouse for analytics\n- **High-performance**: ClickHouse for large-scale vector search workloads\n\n## Integrations\n\nvectorwrap integrates with popular AI frameworks and vector databases:\n\n- **LangChain**: Drop-in VectorStore adapter for RAG pipelines\n- **LlamaIndex**: VectorStore wrapper for data frameworks\n- **Supabase**: Managed PostgreSQL + pgvector helper\n- **Milvus**: Enterprise vector database adapter\n- **Qdrant**: Cloud-native vector search integration\n\n```bash\n# Install with integrations\npip install \"vectorwrap[langchain]\"\npip install \"vectorwrap[llamaindex]\"\npip install \"vectorwrap[milvus]\"\npip install \"vectorwrap[qdrant]\"\n```\n\n**Example with LangChain:**\n```python\nfrom langchain.embeddings import OpenAIEmbeddings\nfrom vectorwrap.integrations.langchain import VectorwrapStore\n\nembeddings = OpenAIEmbeddings()\nvectorstore = VectorwrapStore(\n    connection_url=\"postgresql://user:pass@localhost/db\",\n    collection_name=\"documents\",\n    embedding_function=embeddings\n)\n\nvectorstore.add_texts([\"Hello world\", \"LangChain + vectorwrap\"])\nresults = vectorstore.similarity_search(\"greeting\", k=5)\n```\n\nSee [docs/INTEGRATIONS.md](docs/INTEGRATIONS.md) for complete integration guide.\n\n## Benchmarks\n\nComprehensive performance benchmarks are available in the [`bench/`](bench/) directory.\n\n**Quick benchmark:**\n```bash\npip install \"vectorwrap[all]\" matplotlib\npython bench/benchmark.py\npython bench/visualize.py benchmark_results.json\n```\n\nSee [bench/README.md](bench/README.md) for detailed benchmarking guide.\n\n## Roadmap\n\n### v1.0 Stable Release\n- **API Freeze**: Lock stable APIs with full backward compatibility\n- **Production Testing**: Comprehensive benchmarks across all backends [DONE]\n- **Documentation**: Complete API docs and migration guides\n\n### Future Features\n- **Redis** with RediSearch\n- **Elasticsearch** with dense vector fields\n- **Qdrant** and **Weaviate** support\n- **Batch operations** for bulk inserts\n- **Index configuration** options\n- **Distance metrics**: Cosine, dot product, custom functions\n\n## License\n\nMIT \u00a9 2025 Mihir Ahuja\n\n---\n\nIf **vectorwrap** saved you time, please **star the repo** \u2013 it helps others discover it!\n\n**[PyPI Package](https://pypi.org/project/vectorwrap/) \u2022 [GitHub Repository](https://github.com/mihirahuja/vectorwrap) \u2022 [Report Issues](https://github.com/mihirahuja/vectorwrap/issues)**\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Universal vector search wrapper for Postgres, MySQL, SQLite, DuckDB, ClickHouse (pgvector, HeatWave, sqlite-vss, DuckDB VSS, ClickHouse ANN)",
    "version": "0.6.0",
    "project_urls": {
        "Homepage": "https://github.com/mihirahuja/vectorwrap",
        "Issues": "https://github.com/mihirahuja/vectorwrap/issues",
        "Repository": "https://github.com/mihirahuja/vectorwrap"
    },
    "split_keywords": [
        "vector",
        " database",
        " embeddings",
        " similarity",
        " search",
        " postgresql",
        " mysql",
        " sqlite",
        " duckdb",
        " clickhouse"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4c89ece2f46e184034ef869cfc503a36813fc1e98873563ed1e80f8d88f5ee68",
                "md5": "4b9fcb58aa3c3b5be51ba2b8e3beb3b6",
                "sha256": "d293248db17a8d3a10f18e35e2268717b3d9fc08c7665f8b7cb8b5ef13830a61"
            },
            "downloads": -1,
            "filename": "vectorwrap-0.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4b9fcb58aa3c3b5be51ba2b8e3beb3b6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 33666,
            "upload_time": "2025-10-09T05:48:13",
            "upload_time_iso_8601": "2025-10-09T05:48:13.463159Z",
            "url": "https://files.pythonhosted.org/packages/4c/89/ece2f46e184034ef869cfc503a36813fc1e98873563ed1e80f8d88f5ee68/vectorwrap-0.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0da02107da9b50cd32e9508b9b03c5233834afaf5c21e3ae55bd5e3b154e7658",
                "md5": "afa985fa680e43d2cbcd40010bbb2be6",
                "sha256": "814c723942f5e46bec25b0d9f9818db08bd8d3eabff50d4998f0040ff7ce10eb"
            },
            "downloads": -1,
            "filename": "vectorwrap-0.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "afa985fa680e43d2cbcd40010bbb2be6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 37546,
            "upload_time": "2025-10-09T05:48:14",
            "upload_time_iso_8601": "2025-10-09T05:48:14.970053Z",
            "url": "https://files.pythonhosted.org/packages/0d/a0/2107da9b50cd32e9508b9b03c5233834afaf5c21e3ae55bd5e3b154e7658/vectorwrap-0.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-09 05:48:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mihirahuja",
    "github_project": "vectorwrap",
    "github_not_found": true,
    "lcname": "vectorwrap"
}
        
Elapsed time: 2.39951s