Metadata-Version: 2.4
Name: zoro-client
Version: 0.1.1
Summary: A Python client library for Zoro-DB, a vector search engine.
Project-URL: Homepage, https://github.com/rajathshttgr/zoro-client
Project-URL: Documentation, https://github.com/rajathshttgr/zoro-client/blob/main/docs/Documentation.md
Project-URL: Repository, https://github.com/rajathshttgr/zoro-client
Project-URL: Bug Tracker, https://github.com/rajathshttgr/zoro-client/issues
Project-URL: Changelog, https://github.com/rajathshttgr/zoro-client/blob/main/docs/CHANGELOG.md
Author-email: Rajath Shettigar <rrshttgr@gmail.com>
License: MIT
License-File: LICENSE
Keywords: client,database,search,vector,zoro-db
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.8
Requires-Dist: numpy>=1.23
Requires-Dist: requests>=2.32
Provides-Extra: cli
Requires-Dist: click>=8.0; extra == 'cli'
Requires-Dist: rich>=13.0; extra == 'cli'
Provides-Extra: gui
Requires-Dist: pyqt5>=5.15; extra == 'gui'
Description-Content-Type: text/markdown

<div align="center">

## Zoro Client

A Python client library for [Zoro-DB](https://github.com/rajathshttgr/zoro-db), a vector search engine.

[![PyPI](https://badge.fury.io/py/zoro-client.svg?cache=1)](https://pypi.org/project/zoro-client/)
[![API Docs](https://img.shields.io/badge/Docs-OpenAPI%203.0-success)](https://github.com/rajathshttgr/zoro-db/blob/main/docs/API_DOCS.md)
[![License](https://img.shields.io/badge/license-MIT-blue)](https://github.com/rajathshttgr/zoro-client/blob/main/LICENSE)

</div>

## Installation

```bash
pip install zoro-client
```

## Connecting to Zoro-DB Server

```python
from zoro_client import ZoroClient

client = ZoroClient(host="localhost", port=6464)
# or
client = ZoroClient(url="http://localhost:6464")
```

### Run Zoro-DB locally

```bash
docker run -p 6464:6464 ghcr.io/rajathshttgr/zoro-db:dev
```

## Self-Managed Embeddings

You generate embeddings yourself and store raw vectors.

```python
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)

```

## Documentation

- For usage examples and a walkthrough of available methods, see the [Usage Examples](https://github.com/rajathshttgr/zoro-client/blob/main/docs/USAGE_EXAMPLES.md).
- For detailed API information, refer to the [API Reference](https://github.com/rajathshttgr/zoro-client/blob/main/docs/API_DOCS.md).
