Skip to main content

EigenDB's Official Python API

Project description

EigenDB's Official Python API 🐍

A Python wrapper for EigenDB's REST API.

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

Uploaded Source

Built Distribution

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

eigen_client-1.0.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file eigen_client-1.0.1.tar.gz.

File metadata

  • Download URL: eigen_client-1.0.1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.5

File hashes

Hashes for eigen_client-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8cbd5d9dc9102564332297a66659e9e0ca1b9a834be0bf18f213e89c93ea9a42
MD5 5d3cad005cc13a2c912c1544e40f1c0e
BLAKE2b-256 291a7f880427dbc3d1ca45c5fbe060590def2e96a5412555346cd188d2e767d2

See more details on using hashes here.

File details

Details for the file eigen_client-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: eigen_client-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.5

File hashes

Hashes for eigen_client-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 833eb7f69bb4c391c707cf28839c4a4d02a253c3e07d041d35c9f0a1afee8dc8
MD5 10995d7cca74b86b2e6dbf15bd4462e2
BLAKE2b-256 3d1609cf7ef0a519a55cc4bb5945aadddcb53c11ce581b7e24893fac1c92471d

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