Skip to content

Python client for letsearch โ€” vector DB so easy, even your grandparents can build a RAG system ๐Ÿ˜

Notifications You must be signed in to change notification settings

monatis/letsearch-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

letsearch-client

logo

A Python client for letsearch โ€” the vector DB so easy, even your grandparents can build a RAG system ๐Ÿ˜.

โ“ What is this?

letsearch-client provides an easy-to-use Python interface to interact with a running letsearch server. With this client, you can programmatically manage collections, perform health checks, and run searches without worrying about HTTP requests or JSON parsing.

โš ๏ธ Note: The main letsearch- project and this client are still under active development. Rapid changes may occur as letsearch evolves.


๐Ÿ–ผ๏ธ Features

  • Perform health checks on your letsearch server.
  • List and retrieve collection information.
  • Run searches on indexed collections.
  • Automatically handle errors and raise exceptions when needed.

๐ŸŽ๏ธ Installation

Install letsearch-client via uv (recommended) or pip:

uv add letsearch-client

or:

pip install letsearch-client

If you want to convert models to use with letsearch, you need to install additional conversion-related dependencies:

pip install letsearch-client[conversion]

๐Ÿš€ Quickstart

Hereโ€™s how you can use the LetsearchClient to interact with a running letsearch instance:

Setup

from letsearch_client import LetsearchClient

# Initialize the client
client = LetsearchClient(letsearch_url="http://localhost:7898", raise_for_status=True)

# Always remember to close the client or use it in a context manager
client.close()

Alternatively, use a context manager to ensure proper cleanup:

from letsearch_client import LetsearchClient

with LetsearchClient(letsearch_url="http://localhost:7898") as client:
    health = client.healthcheck()
    print(health)

Example Usage

Health Check

response = client.healthcheck()
print(response)  # Outputs server health status and version

List Collections

collections = client.get_collections()
print(collections)  # Outputs a list of available collections

Retrieve Collection Info

collection_info = client.get_collection("example_collection")
print(collection_info)  # Outputs details about the specified collection

Search in a Collection

results = client.search(
    collection_name="example_collection",
    column_name="content",
    query="example query",
    limit=5
)
print(results)  # Outputs search results

๐Ÿงญ Roadmap

The roadmap of the letsearch project can be found in its repository. This client is intended to be a thin wrapper around the functionality of letsearch, and it will continue to implement new features as letsearch evolves.


๐ŸŒก๏ธ Tests

Run the clientโ€™s test suite using:

pytest

About

Python client for letsearch โ€” vector DB so easy, even your grandparents can build a RAG system ๐Ÿ˜

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages