Skip to main content

A modular text embedding and vector database pipeline for local and cloud vector stores.

Project description

vectorDBpipe

Version: 0.1.0
Author: Yash Desai
Email: desaisyash1000@gmail.com


A modular text embedding and vector database pipeline for local and cloud vector stores.
Designed to streamline text preprocessing, embedding generation, and semantic search with multiple backends such as FAISS, Chroma, and Pinecone.


🚀 Features

  • Load text from files or directories
  • Clean and preprocess text efficiently
  • Chunk text for large documents
  • Generate embeddings with Sentence Transformers
  • Store and retrieve embeddings using local (FAISS, Chroma) or cloud (Pinecone) vector databases
  • Integrated logging for pipeline operations
  • Fully modular and extendable design

💻 Installation

Install vectorDBpipe directly from PyPI:

pip install vectorDBpipe

⚙️ Configuration

vectorDBpipe uses a config.yaml file for configuration. You can customize paths, models, and vector database settings.

Pinecone API Key

If you use the pinecone vector database, you must provide your API key via an environment variable. The library will automatically load it.

Linux/macOS:

export PINECONE_API_KEY="YOUR_API_KEY"

Windows:

$env:PINECONE_API_KEY="YOUR_API_KEY"

⚙️ Basic Usage

1️⃣ Load Data and Generate Embeddings

from vectorDBpipe.data.loader import DataLoader
from vectorDBpipe.embeddings.embedder import Embedder

# Load all text files from a directory
loader = DataLoader("data/")
data = loader.load_all_files()

# Extract text contents
texts = [d["content"] for d in data]

# Create embeddings
embedder = Embedder()
vectors = embedder.encode(texts)

print("Vectors shape:", vectors.shape)

2️⃣ Text Cleaning and Chunking

from vectorDBpipe.logger.logging import setup_logger
from vectorDBpipe.utils.common import clean_text, chunk_text

logger = setup_logger("TextPipeline")

text = "AI   is transforming   the world!"
cleaned = clean_text(text)
chunks = chunk_text(cleaned, chunk_size=50)

logger.info(f"Cleaned text: {cleaned}")
logger.info(f"Generated {len(chunks)} chunks.")

Output Example:

INFO:TextPipeline: Cleaned text: ai is transforming the world!
INFO:TextPipeline: Generated 1 chunks.

3️⃣ Modular Vector Storage & Retrieval

from vectorDBpipe.vectorstore.faiss_store import FAISSVectorStore

# Initialize vector store
vector_store = FAISSVectorStore(dim=384)

# Add embeddings and metadata
metadata = [{"text": t} for t in texts]
vector_store.add(vectors, metadata)

# Search similar text
query = "Artificial Intelligence"
results = vector_store.search(query, top_k=3)
print("Search results:", results)

📝 Project Structure

vectorDBpipe/
├── data/                      # Example dataset
├── vectorDBpipe/
│   ├── data/loader.py         # Data loading module
│   ├── embeddings/embedder.py # Embedding generation
│   ├── vectorstore/           # Vector DB modules (FAISS, Chroma, Pinecone)
│   ├── logger/                # Logging setup
│   └── utils/                 # Helper functions (cleaning, chunking, etc.)
├── tests/                     # Unit tests
├── demo/                      # Demo Jupyter notebooks
├── setup.py
└── README.md

📒 Logging & Debugging

  • Use setup_logger() to create named loggers for your pipeline.
  • Logs capture preprocessing, embedding, and vector store operations for easier debugging.
logger = setup_logger("TextPipeline")
logger.info("Pipeline started...")

✅ Contribution Guide

  1. Fork the repository
  2. Create a branch:
    git checkout -b feature/my-feature
  3. Add or modify code with proper docstrings and type hints
  4. Add tests under tests/
  5. Submit a Pull Request with a detailed description

📖 Demo Notebooks

  • demo/TextPipeline_demo.ipynb: Step-by-step demonstration of data loading, preprocessing, embedding, storage, and search.
  • Visualize similarity search results using pandas or matplotlib.

📜 License

This project is licensed under the MIT License.
See LICENSE for more details.


🔗 Contact

Author: Yash Desai
Email: desaisyash1000@gmail.com
GitHub: https://github.com/yashdesai023/vectorDBpipe


Ready for contributions and feedback! If you need a polished demo notebook, let me know!

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

vectorDBpipe-0.1.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distributions

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

vectordbpipe-0.1.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

vectorDBpipe-0.1.0-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file vectorDBpipe-0.1.0.tar.gz.

File metadata

  • Download URL: vectorDBpipe-0.1.0.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vectorDBpipe-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ebef2b4f9df06ea740f9678849c1c5b857b0e33c4bd274f3c894d93a785cc9f2
MD5 c72fd80f71b1fbcffd4132e398ab6db8
BLAKE2b-256 97307ca689d28d372824624ec025ce6fc0e60da4bde9ab0f7d0c75c9ac821bc7

See more details on using hashes here.

Provenance

The following attestation bundles were made for vectorDBpipe-0.1.0.tar.gz:

Publisher: publish-to-pypi.yml on yashdesai023/vectorDBpipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vectordbpipe-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vectordbpipe-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vectordbpipe-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 21ddfb33378b83392f7505847e95a39ed86bfd9dcf586e9174c29270b5c9fc55
MD5 d9edf49f0402c9e831f9d5523671d629
BLAKE2b-256 55f10955da8ddc26a347bdb537be2ac874032df0fb1deca73ec551dc24e8e944

See more details on using hashes here.

Provenance

The following attestation bundles were made for vectordbpipe-0.1.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on yashdesai023/vectorDBpipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vectorDBpipe-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vectorDBpipe-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vectorDBpipe-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c126a6067a3ae96318f21309a9338f34f9b1e214595ac7bbeb90ca959f91927
MD5 fc3452d1f97780d9787ed8e4e47d4b2f
BLAKE2b-256 265f30fb0c7286bab03989a3e016682262ab363baa781e1b12b9c1d9cf90d237

See more details on using hashes here.

Provenance

The following attestation bundles were made for vectorDBpipe-0.1.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on yashdesai023/vectorDBpipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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