Python Client SDK for Luma (RustKissVDB)
Project description
langchain_luma
A Python client SDK for Luma (RustKissVDB), designed for simplicity and optional integration with LangChain.
Installation
pip install .
To install with LangChain support:
pip install ".[langchain]"
Quick Start
from langchain_luma import LumaClient
# Initialize client (defaults to http://localhost:1234, api_key="dev")
luma = LumaClient(url="http://localhost:1234")
# Check system health
print(luma.system.health())
# Create a vector collection
luma.vectors.create_collection("docs", dim=384, metric="cosine")
# Upsert a vector
luma.vectors.upsert(
collection="docs",
id="vec1",
vector=[0.1] * 384,
meta={"category": "test"}
)
# Search
hits = luma.vectors.search("docs", vector=[0.1] * 384, k=3)
for hit in hits:
print(f"ID: {hit.id}, Score: {hit.score}")
LangChain Integration
If you have langchain installed, you can use LumaVectorStore:
from langchain_luma.langchain.vectorstore import LumaVectorStore
# Ensure you have an embedding function compatible with LangChain
# from langchain_community.embeddings import FakeEmbeddings
# embeddings = FakeEmbeddings(size=384)
# vector_store = LumaVectorStore(
# client=luma,
# collection_name="docs",
# embedding_function=embeddings
# )
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
langchain_luma-0.1.0.tar.gz
(13.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_luma-0.1.0.tar.gz.
File metadata
- Download URL: langchain_luma-0.1.0.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe3f1de1df5f28a66deb8f13021d34c1d42efeda217513a6c019a79340960181
|
|
| MD5 |
8d661edb2a80a36ed55e4db957424742
|
|
| BLAKE2b-256 |
6ef8fc7b5431a5973ee9f89caba3a9dc460f1c15570792b7c6c177724b761c9c
|
File details
Details for the file langchain_luma-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_luma-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d935501b14227d8663fa3c58708a7695bfc481c165b22b5428d03f1df03ec8ce
|
|
| MD5 |
46ae8887d68c8f2df899210044ba9a1b
|
|
| BLAKE2b-256 |
bf80ef4b01e69136d6ead50a297bd98eaebbfaefeccf364e40f4fd25aeb7f23e
|