← Back to all products

Vector Database Toolkit

$39

Setup guides for Pinecone, Weaviate, ChromaDB, and pgvector with indexing strategies, hybrid search, and benchmarking scripts.

35 files
PythonMarkdownJSONDockerPostgreSQLLLM

Product Preview

Try the interactive reader and demo tools below, or get the full product with all content unlocked.

Interactive Reader (Free Preview) ⚙ Try Demo Tools Download Free Sample

File Structure 35 files

vector-database-toolkit/ ├── LICENSE ├── README.md ├── benchmarks/ │ ├── __pycache__/ │ │ └── harness.cpython-312.pyc │ └── harness.py ├── free-sample.zip ├── guide/ │ └── 01-indexing-strategies.md ├── guides/ │ └── indexing-strategies.md ├── index.html ├── interactive.html ├── requirements.txt ├── src/ │ ├── __init__.py │ ├── __pycache__/ │ │ ├── __init__.cpython-312.pyc │ │ ├── interface.cpython-312.pyc │ │ └── migration.cpython-312.pyc │ ├── adapters/ │ │ ├── __init__.py │ │ ├── __pycache__/ │ │ │ ├── __init__.cpython-312.pyc │ │ │ ├── chroma_adapter.cpython-312.pyc │ │ │ ├── memory_adapter.cpython-312.pyc │ │ │ ├── pgvector_adapter.cpython-312.pyc │ │ │ ├── pinecone_adapter.cpython-312.pyc │ │ │ └── weaviate_adapter.cpython-312.pyc │ │ ├── chroma_adapter.py │ │ ├── memory_adapter.py │ │ ├── pgvector_adapter.py │ │ ├── pinecone_adapter.py │ │ └── weaviate_adapter.py │ ├── interface.py │ └── migration.py └── tests/ ├── __pycache__/ │ ├── conftest.cpython-312-pytest-9.0.2.pyc │ ├── conftest.cpython-312.pyc │ ├── test_adapters.cpython-312-pytest-9.0.2.pyc │ └── test_adapters.cpython-312.pyc ├── conftest.py └── test_adapters.py

Documentation Preview README excerpt

Vector Database Toolkit

Unified interface, per-backend adapters, benchmarking harness, and migration tools for Pinecone, Weaviate, ChromaDB, and pgvector.

Stop rewriting vector database code when you switch backends. One interface, four adapters, a benchmark suite that runs without external services, and migration scripts to move data between any two backends.

What You Get

  • Common VectorStore interface — write backend-agnostic code that works with any vector database
  • Four production adapters — Pinecone (serverless + pods), Weaviate (native hybrid search), ChromaDB (zero-config), pgvector (PostgreSQL)
  • In-memory reference adapter — full brute-force + BM25 implementation for testing and benchmarks, zero external deps
  • Benchmarking harness — measure insert throughput, search latency at multiple top-k values, and recall@10 against brute-force ground truth
  • Migration tool — move vectors between any two backends with progress tracking and error handling
  • Indexing strategy guide — HNSW vs IVFFlat parameter tuning with per-backend configuration examples

File Tree


vector-database-toolkit/
├── README.md
├── LICENSE
├── requirements.txt
├── src/
│   ├── __init__.py
│   ├── interface.py                      # Common VectorStore abstract interface
│   ├── migration.py                      # Cross-backend migration tool
│   └── adapters/
│       ├── __init__.py
│       ├── memory_adapter.py             # In-memory adapter (BM25 + cosine, no deps)
│       ├── pinecone_adapter.py           # Pinecone serverless/pod adapter
│       ├── weaviate_adapter.py           # Weaviate adapter (native hybrid search)
│       ├── chroma_adapter.py             # ChromaDB adapter
│       └── pgvector_adapter.py           # PostgreSQL + pgvector adapter
├── benchmarks/
│   └── harness.py                        # Latency/recall benchmarking harness
├── tests/
│   ├── conftest.py
│   └── test_adapters.py                  # CRUD, search, filter, migration tests
└── guides/
    └── indexing-strategies.md            # HNSW/IVF tuning guide

Quick Start

1. Install


pip install -r requirements.txt
# Or install only what you need:
pip install pinecone-client    # for Pinecone
pip install chromadb           # for ChromaDB
pip install weaviate-client    # for Weaviate
pip install psycopg2-binary   # for pgvector

2. Use the Common Interface



*... continues with setup instructions, usage examples, and more.*

Code Sample .py preview

src/interface.py """ Common VectorStore Interface — Vector Database Toolkit ======================================================= Defines the abstract contract that all vector database adapters implement. Use this interface to write backend-agnostic code that can swap between Pinecone, Weaviate, ChromaDB, pgvector, or the included in-memory implementation. By Datanest Digital — [email protected] """ from __future__ import annotations import logging from abc import ABC, abstractmethod from dataclasses import dataclass, field from typing import Any, Dict, List, Optional logger = logging.getLogger(__name__) @dataclass class VectorRecord: """A record stored in the vector database. Attributes: id: Unique identifier for this vector. vector: The dense embedding vector. metadata: Arbitrary key-value metadata attached to the vector. Use this for filtering, source tracking, and hybrid search. text: Optional original text that was embedded. Stored alongside the vector for retrieval convenience. """ id: str = "" vector: List[float] = field(default_factory=list) metadata: Dict[str, Any] = field(default_factory=dict) text: str = "" @dataclass class SearchResult: """A single search hit from a vector database query. Attributes: record: The matched vector record. score: Relevance score (higher is better). The scale depends on the backend and distance metric — cosine similarity returns [0, 1], L2 distance returns non-negative values where lower is better (inverted before returning). distance_metric: Which metric produced this score. # ... 141 more lines ...