Python client for colbertdb
Project description
Colbertdb Python Client
This is a Python client for interacting with the Colbertdb API. 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
To install the Colbertdb Python client, clone the repository and install the required dependencies:
git clone https://github.com/colbertd/pycolbertdb.git
cd pycolbertdb
poetry install
Usage
from colbertdb 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
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.1.0.tar.gz.
File metadata
- Download URL: pycolbertdb-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Darwin/23.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
189b279dbb69d73d3afaaa56e14c9412225247ecaa1c3b769ad576e335a042fe
|
|
| MD5 |
56566cba9208f32598e846698d8d2ad7
|
|
| BLAKE2b-256 |
a9f45cb1e00823e246b04b179570aa2d679a113ad4708e055bc300a784d05650
|
File details
Details for the file pycolbertdb-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pycolbertdb-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Darwin/23.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8f5ca918404ef555970e07581257903c5ea7c8e567d590f2ce3200f6f1e8819
|
|
| MD5 |
99f9bce2cec1450750ddc0121765b605
|
|
| BLAKE2b-256 |
0b327664357cdf379f45a8b6f8fe8edf52b02a624206ebca0940ac94af461444
|