Metadata-Version: 2.5
Name: ragleap-vectorstores
Version: 0.3.3
Summary: Pluggable vector backends beyond ragleap-rag core's 6 (PgVector, FAISS, Pinecone, Weaviate, Qdrant, Milvus) - additional VectorBackend implementations as optional extras, no vendor lock-in, no bloated core dependency footprint.
Project-URL: Homepage, https://github.com/antonyrag/ragleap-core
Project-URL: Repository, https://github.com/antonyrag/ragleap-core
Project-URL: Documentation, https://packages.ragleap.com/docs/ragleap-vectorstores.html
Project-URL: Issues, https://github.com/antonyrag/ragleap-core/issues
Author-email: Antony <antony@ragleap.com>
License-Expression: MIT
Keywords: chroma,chromadb,embeddings,lancedb,rag,ragleap,redis,redisearch,similarity-search,vector-database,vector-search
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: ragleap-rag>=0.12.4
Provides-Extra: chroma
Requires-Dist: chromadb>=1.0.0; extra == 'chroma'
Provides-Extra: lancedb
Requires-Dist: lancedb>=0.15.0; extra == 'lancedb'
Requires-Dist: pyarrow>=14.0.0; extra == 'lancedb'
Provides-Extra: redis
Requires-Dist: numpy>=1.24.0; extra == 'redis'
Requires-Dist: redis>=5.0.0; extra == 'redis'
Provides-Extra: test
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'test'
Requires-Dist: pytest>=8.0.0; extra == 'test'
Description-Content-Type: text/markdown

# ragleap-vectorstores

Pluggable vector backends beyond [ragleap-rag](https://pypi.org/project/ragleap-rag/)'s
built-in 6 (PgVector, FAISS, Pinecone, Weaviate, Qdrant, Milvus).

This package is under active development - more backends will be added
over time. See the
[roadmap](https://github.com/antonyrag/ragleap-core/wiki/Roadmap) for status.

## Available backends

| Backend | Extra | Notes |
|---|---|---|
| Chroma | `chroma` | Embedded/local via chromadb's PersistentClient - no server required. No native sparse/keyword search (`supports_sparse()` is `False`); hybrid search falls back to dense-only. |
| LanceDB | `lancedb` | Embedded/local via a directory path - no server required. Real upsert semantics via `merge_insert()`. No native sparse/keyword search enabled yet (`supports_sparse()` is `False`); hybrid search falls back to dense-only. |
| Redis | `redis` | Requires a real running server - Redis Stack, or plain Redis with the RediSearch module loaded (no embedded/local mode). `init_schema()` checks for the module and raises a clear error if it's missing. Metadata filtering only supports `document_id` (RediSearch requires predeclared schema fields). No native sparse/keyword search enabled yet (`supports_sparse()` is `False`); hybrid search falls back to dense-only. |

## Design

Every backend here implements ragleap-rag's `VectorBackend` interface, so it
can be passed directly to `RagLeap(vector_backend=...)`. Each backend's real
client SDK is an optional extra - installing `ragleap-vectorstores` alone
pulls in no heavy dependencies beyond `ragleap-rag` itself.

## Install

```bash
pip install ragleap-vectorstores[chroma]
# or, with uv
uv add ragleap-vectorstores[chroma]

pip install ragleap-vectorstores[lancedb]
# or, with uv
uv add ragleap-vectorstores[lancedb]
```

## Usage

```python
from ragleap_vectorstores import ChromaBackend

backend = ChromaBackend(persist_directory="./chroma_data")
```

```python
from ragleap_vectorstores import LanceDBBackend

backend = LanceDBBackend(uri="./lancedb_data")
```

```python
from ragleap_vectorstores import RedisBackend

# Requires a real Redis Stack instance (or plain Redis + the RediSearch
# module) - plain Redis alone has no vector search.
backend = RedisBackend(redis_url="redis://localhost:6379/0")
```
