EigenDB's Official Python API
Project description
EigenDB's Official Python SDK 🐍
A Python client for EigenDB's REST API.
Installation
pip install eigen-client
Example usage:
import os
from eigen_client.client import Client
from eigen_client.data_types import Document
client = Client(
url="http://localhost:8080",
api_key="eigendb-***",
)
index = client.create_index_from_model(
index_name="food-facts",
model_name="text-embedding-3-small",
model_provider="openai",
model_provider_api_key="your openai api key..."
)
documents = [
Document(id=1, data="Fresh herbs boost flavor.", metadata={"recipe_id": "123"}),
Document(id=2, data="Slow simmer blends soup.", metadata={"recipe_id": "456"}),
Document(id=3, data="Homemade bread smells great.", metadata={"recipe_id": "789"}),
Document(id=4, data="Grilled veggies taste sweeter.", metadata={"recipe_id": "987"}),
Document(id=5, data="Cast iron sears steak well.", metadata={"recipe_id": "654"})
]
index.upsert_docs(documents)
results = index.search_docs(
string="Baking",
k=3
)
print(results)
Documentation
Documentation can be found here!
Made with ❤️ by developers, for developers.
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
eigen_client-1.0.4.tar.gz
(7.3 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 eigen_client-1.0.4.tar.gz.
File metadata
- Download URL: eigen_client-1.0.4.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0784d9cd32c2e7129c1a6eacc9a8b7422f4ba379afe6947d49fc166084611860
|
|
| MD5 |
e9751dbb52e580fdedde7ddf36611fb5
|
|
| BLAKE2b-256 |
bbb3167e8e44d248a948e33d79365e3a497daaae7898892084588748d1dfe4ce
|
File details
Details for the file eigen_client-1.0.4-py3-none-any.whl.
File metadata
- Download URL: eigen_client-1.0.4-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b98ec5d4b87cf64689e7149f17a8fc307a2d365e25118a4d5ee76fd5634e7b0
|
|
| MD5 |
b25c686648a5148c14cf84bfe4eb948f
|
|
| BLAKE2b-256 |
abbb05b6f9d74991257e47cf66c1f61236435518112ffbd6261e3fd2cdcb451b
|