Skip to main content

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


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.3.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycolbertdb-0.2.3-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file pycolbertdb-0.2.3.tar.gz.

File metadata

  • Download URL: pycolbertdb-0.2.3.tar.gz
  • Upload date:
  • Size: 4.7 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

Hashes for pycolbertdb-0.2.3.tar.gz
Algorithm Hash digest
SHA256 ce61df36eec20d9b04937aabcaf923d03c72c03634120f6d1aae0cbf51d37d8e
MD5 f4d045fd871ebb480e1ad80b2eebacf5
BLAKE2b-256 683743d8252b16966f7f3e9112858c6592fb3eb35c84c26d292858efda4ca3a1

See more details on using hashes here.

File details

Details for the file pycolbertdb-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: pycolbertdb-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 5.7 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

Hashes for pycolbertdb-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4463b2a33fe7038c32efb4ca30a721d617f072ff35e420d97de9cfb07c8e6a81
MD5 adc74a4b0e7d4c2c7b2caf837d693b38
BLAKE2b-256 4d3b0c0939bac8bf473dc9c147f035de61dc840fcce2e0314d4f14db74500940

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page