Name | letsearch-client JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | Python client for letsearch, RAG-native vector DB in a single binary to embed, index and serve your documents for search |
upload_time | 2024-12-09 11:00:52 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | None |
keywords |
letsearch
rag
vectordb
onnx
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# letsearch-client
A Python client for [letsearch](https://github.com/monatis/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:
```sh
uv add letsearch-client
```
or:
```sh
pip install letsearch-client
```
If you want to convert models to use with `letsearch`, you need to install additional conversion-related dependencies:
```sh
pip install letsearch-client[conversion]
```
---
## 🚀 Quickstart
Here’s how you can use the `LetsearchClient` to interact with a running [letsearch](https://github.com/monatis/letsearch) instance:
### Setup
```python
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:
```python
from letsearch_client import LetsearchClient
with LetsearchClient(letsearch_url="http://localhost:7898") as client:
health = client.healthcheck()
print(health)
```
---
### Example Usage
#### Health Check
```python
response = client.healthcheck()
print(response) # Outputs server health status and version
```
#### List Collections
```python
collections = client.get_collections()
print(collections) # Outputs a list of available collections
```
#### Retrieve Collection Info
```python
collection_info = client.get_collection("example_collection")
print(collection_info) # Outputs details about the specified collection
```
#### Search in a Collection
```python
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](https://github.com/monatis/letsearch).
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:
```sh
pytest
```
Raw data
{
"_id": null,
"home_page": null,
"name": "letsearch-client",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "letsearch, rag, vectordb, onnx",
"author": null,
"author_email": "Yusuf Sar\u0131g\u00f6z <yusufsarigoz@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/7f/0a/7d6cae93d7bfafe52a946ab066cc33a6046fb366dbfb19901c804f2df105/letsearch_client-0.1.1.tar.gz",
"platform": null,
"description": "# letsearch-client\r\n\r\nA Python client for [letsearch](https://github.com/monatis/letsearch) \u2014 the vector DB so easy, even your grandparents can build a RAG system \ud83d\ude01.\r\n\r\n## \u2753 What is this?\r\n\r\n`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.\r\n\r\n\u26a0\ufe0f **Note**: The main `letsearch-` project and this client are still under active development. Rapid changes may occur as `letsearch` evolves.\r\n\r\n---\r\n\r\n## \ud83d\uddbc\ufe0f Features\r\n\r\n- Perform health checks on your `letsearch` server.\r\n- List and retrieve collection information.\r\n- Run searches on indexed collections.\r\n- Automatically handle errors and raise exceptions when needed.\r\n\r\n---\r\n\r\n## \ud83c\udfce\ufe0f Installation\r\n\r\nInstall `letsearch-client` via uv (recommended) or pip:\r\n\r\n```sh\r\nuv add letsearch-client\r\n```\r\n\r\nor:\r\n\r\n```sh\r\npip install letsearch-client\r\n```\r\n\r\nIf you want to convert models to use with `letsearch`, you need to install additional conversion-related dependencies:\r\n\r\n```sh\r\npip install letsearch-client[conversion]\r\n```\r\n\r\n---\r\n\r\n## \ud83d\ude80 Quickstart\r\n\r\nHere\u2019s how you can use the `LetsearchClient` to interact with a running [letsearch](https://github.com/monatis/letsearch) instance:\r\n\r\n### Setup\r\n\r\n```python\r\nfrom letsearch_client import LetsearchClient\r\n\r\n# Initialize the client\r\nclient = LetsearchClient(letsearch_url=\"http://localhost:7898\", raise_for_status=True)\r\n\r\n# Always remember to close the client or use it in a context manager\r\nclient.close()\r\n```\r\n\r\nAlternatively, use a context manager to ensure proper cleanup:\r\n\r\n```python\r\nfrom letsearch_client import LetsearchClient\r\n\r\nwith LetsearchClient(letsearch_url=\"http://localhost:7898\") as client:\r\n health = client.healthcheck()\r\n print(health)\r\n```\r\n\r\n---\r\n\r\n### Example Usage\r\n\r\n#### Health Check\r\n\r\n```python\r\nresponse = client.healthcheck()\r\nprint(response) # Outputs server health status and version\r\n```\r\n\r\n#### List Collections\r\n\r\n```python\r\ncollections = client.get_collections()\r\nprint(collections) # Outputs a list of available collections\r\n```\r\n\r\n#### Retrieve Collection Info\r\n\r\n```python\r\ncollection_info = client.get_collection(\"example_collection\")\r\nprint(collection_info) # Outputs details about the specified collection\r\n```\r\n\r\n#### Search in a Collection\r\n\r\n```python\r\nresults = client.search(\r\n collection_name=\"example_collection\",\r\n column_name=\"content\",\r\n query=\"example query\",\r\n limit=5\r\n)\r\nprint(results) # Outputs search results\r\n```\r\n\r\n---\r\n\r\n## \ud83e\udded Roadmap\r\n\r\nThe roadmap of the `letsearch` project can be found in [its repository](https://github.com/monatis/letsearch).\r\nThis client is intended to be a thin wrapper around the functionality of `letsearch`,\r\nand it will continue to implement new features as `letsearch` evolves.\r\n\r\n---\r\n\r\n## \ud83c\udf21\ufe0f Tests\r\n\r\nRun the client\u2019s test suite using:\r\n\r\n```sh\r\npytest\r\n```\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Python client for letsearch, RAG-native vector DB in a single binary to embed, index and serve your documents for search",
"version": "0.1.1",
"project_urls": {
"homepage": "https://github.com/monatis/letsearch",
"project": "https://github.com/monatis/letsearch",
"repository": "https://github.com/monatis/letsearch-client"
},
"split_keywords": [
"letsearch",
" rag",
" vectordb",
" onnx"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "c8fff0b893779826f22e3b3844b1e254ab09d605f12a75420f8e1052d73a1118",
"md5": "05a1e96be2e2a6838f719a7f6938688d",
"sha256": "88b9e8877999f676a308f5fc785ef27195e8bc67caaf73b9ae1010e010514e78"
},
"downloads": -1,
"filename": "letsearch_client-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "05a1e96be2e2a6838f719a7f6938688d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 6787,
"upload_time": "2024-12-09T11:00:51",
"upload_time_iso_8601": "2024-12-09T11:00:51.155477Z",
"url": "https://files.pythonhosted.org/packages/c8/ff/f0b893779826f22e3b3844b1e254ab09d605f12a75420f8e1052d73a1118/letsearch_client-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "7f0a7d6cae93d7bfafe52a946ab066cc33a6046fb366dbfb19901c804f2df105",
"md5": "10ba3e4a1c8c948140ea68f8b2454290",
"sha256": "0ede79ed048d0417c8177f8bd07ab3297b6534e9a0640854037ffc3c28641252"
},
"downloads": -1,
"filename": "letsearch_client-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "10ba3e4a1c8c948140ea68f8b2454290",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 6081,
"upload_time": "2024-12-09T11:00:52",
"upload_time_iso_8601": "2024-12-09T11:00:52.164724Z",
"url": "https://files.pythonhosted.org/packages/7f/0a/7d6cae93d7bfafe52a946ab066cc33a6046fb366dbfb19901c804f2df105/letsearch_client-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-09 11:00:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "monatis",
"github_project": "letsearch",
"github_not_found": true,
"lcname": "letsearch-client"
}