pip install zoro-clientfrom zoro_client import ZoroClient
client = ZoroClient(host="localhost", port=6464)
# or
client = ZoroClient(url="http://localhost:6464")docker run -p 6464:6464 ghcr.io/rajathshttgr/zoro-db:devYou generate embeddings yourself and store raw vectors.
from zoro_client import VectorConfig, Distance
# Create collection
client.create_collection(
collection_name="test",
vector_config=VectorConfig(size=100, distance=Distance.COSINE)
)
# Upsert points
import numpy as np
vectors = np.random.rand(5, 100).tolist()
payloads = [
{"document": "LangChain integration"},
{"document": "LlamaIndex integration"},
{"document": "Hybrid search"},
{"document": "Fast ANN search"},
{"document": "Python for Machine Learning"},
]
client.upsert_points(
collection_name="test",
vectors=vectors,
ids=[12, 4, 34, 23, 2],
payloads=payloads,
)
# search query
results = client.search(
collection_name="test", query_vector=np.random.rand(100).tolist(), limit=2
)
print(results)- For usage examples and a walkthrough of available methods, see the Usage Examples.
- For detailed API information, refer to the API Reference.