EigenDB's Official Python API
Project description
EigenDB's Official Python API 🐍
A Python client for EigenDB's REST API.
Installation
pip install eigen-client
Example usage:
import os
from eigen_client.index import Index
from eigen_client.data_types import Document
index = Index(
url="http://localhost:8080",
api_key="your eigendb api key...",
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)
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.2.tar.gz
(6.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.2.tar.gz.
File metadata
- Download URL: eigen_client-1.0.2.tar.gz
- Upload date:
- Size: 6.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 |
fa6c2bb6f825756bcb15f5207fbd687c9901d8ea48c2c09b740d17387f1f2061
|
|
| MD5 |
cf09e38379e36826e52d39c5ad098333
|
|
| BLAKE2b-256 |
1c4408730995be50a38b8a3b6cc24a4810b8c2890e8629c67a9f608df54d1dbd
|
File details
Details for the file eigen_client-1.0.2-py3-none-any.whl.
File metadata
- Download URL: eigen_client-1.0.2-py3-none-any.whl
- Upload date:
- Size: 6.3 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 |
064871e76ecddc6a481fedb6acf0a22db3a4bc6f58ddf8ad641d8f63868e2877
|
|
| MD5 |
275505a2c52b3de0905e4a1a3e5b6053
|
|
| BLAKE2b-256 |
4ece4739f17598db4b6f8082fa50047ebc8600607003b9f006453241fc7cb97d
|