Python client for colbertdb
Project description
colbertDB Python Client
This is a Python client for 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
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pycolbertdb-0.2.7.tar.gz
(5.0 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 pycolbertdb-0.2.7.tar.gz.
File metadata
- Download URL: pycolbertdb-0.2.7.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/6.5.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
897465baa3d6086aabdfcca48c9d0c8988808e2039ac020d571a8c6932307ff1
|
|
| MD5 |
5a9825c557d6b8f101fcd4a936e1bad0
|
|
| BLAKE2b-256 |
dd1535989a16df74dc0753a00e8ea20d8037d0a3e08cf67d95bd0074aea9d9e5
|
File details
Details for the file pycolbertdb-0.2.7-py3-none-any.whl.
File metadata
- Download URL: pycolbertdb-0.2.7-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/6.5.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdeccd295b50763013f85be97fc9fc84c757cdee7b17156d34805c4326251cf8
|
|
| MD5 |
e8ec258479c1c5a11da11493ac494967
|
|
| BLAKE2b-256 |
811bb5b94c2d4c0c7d162d89b1d89ff83624c1106aa158b52a246709bb995f71
|