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.5.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.5.tar.gz.
File metadata
- Download URL: pycolbertdb-0.2.5.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 |
7f52fc8bb58d56b42eaa2caf074129034d34f794b8cfc5ccecea161ee893cf13
|
|
| MD5 |
6b1f2e124e18b88b1bb12fd0b5f37231
|
|
| BLAKE2b-256 |
7261c15d7076895111d05e17c97a224b21ccf04b426283461ae6310349f69152
|
File details
Details for the file pycolbertdb-0.2.5-py3-none-any.whl.
File metadata
- Download URL: pycolbertdb-0.2.5-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 |
66ae54cff38ebf353c87e4bcd535be54c650f261002879e0aa73c71c9f593c92
|
|
| MD5 |
020a225d33ca1f4ef8aeaa229a34f0f6
|
|
| BLAKE2b-256 |
5a597e9d9ad035bc18a97edb01c75988ec7e6b7d4f8b49f7aba242350141ffce
|