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.4.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.4.tar.gz.
File metadata
- Download URL: pycolbertdb-0.2.4.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 |
fda31d789cd55107c27fbb757ca2db8d3a151481292c6528016526fc27aebd6c
|
|
| MD5 |
a4abb5343a8537718eb5dd271cbe1477
|
|
| BLAKE2b-256 |
899e8f9c5a3c887c6b47c47dd158ee2c3348ef96ca87d7454289e81ec190fee4
|
File details
Details for the file pycolbertdb-0.2.4-py3-none-any.whl.
File metadata
- Download URL: pycolbertdb-0.2.4-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 |
88f4f6ace676afcab00695108157973721fbc855d4f2ccbcfd54234848755102
|
|
| MD5 |
5579a1e3cf7af4e0c15d1dbdd75f40cf
|
|
| BLAKE2b-256 |
5a849b53127f299dc92334326b93b9a59d47557a4edb0652ab6d0acef593a3e9
|