Metadata-Version: 2.1
Name: pycolbertdb
Version: 0.2.1
Summary: Python client for colbertdb
License: MIT
Author: Ryan Sloan
Author-email: rysloan4@gmail.com
Requires-Python: >=3.12,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: datamodel-code-generator[http] (>=0.25.6,<0.26.0)
Requires-Dist: llama-index-readers-web (>=0.1.14,<0.2.0)
Requires-Dist: pytest (>=8.2.0,<9.0.0)
Requires-Dist: requests (>=2.31.0,<3.0.0)
Description-Content-Type: text/markdown

# Colbertdb Python Client
This is a Python client for [ColBERTdb](https://www.github.com/colbertdb/colbertdb). It provides a simple interface for managing collections and documents, and for performing searches within collections.

## Features
- Create and manage collections: Easily create new collections and manage existing ones.
- Add and delete documents: Add new documents to collections and delete existing ones.
- Search collections: Perform search queries on collections and retrieve relevant documents.

## Installation
```
pip install pycolbertdb
```

## Usage
```python
from colbertdb.client import Colbertdb
from llama_index.readers.web import SimpleWebPageReader

client = Colbertdb(url="http://localhost:8080")
client.connect()

docs = SimpleWebPageReader(html_to_text=True).load_data(
    ["https://www.radar.com/documentation/api"]
)
docs = [{"content": doc.text, "metadata": {"source": doc.id_}} for doc in docs]
collection = colbertdb.create_collection(collection_name, documents=docs)
response = collection.search(query="How do I add a geofence?", k=3)
print(response)
```

