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.0.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.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: eigen_client-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 35af4321362d2eac27b104b312f78855e3bf555154fc83b1e5738f8304917a58
MD5 c8c063e60b6929c77d102ee214ac64f6
BLAKE2b-256 54504523780cc036c07b60ea020837df251f2f3b41ea0dd3189252c2793ef929

See more details on using hashes here.

File details

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

File metadata

  • Download URL: eigen_client-1.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98136a25c3c7a9cdb3f19f745676f4a64742307f0f519d2f55f231d978db1846
MD5 31c1c96e1ef0d83832c1d48bf9d68a79
BLAKE2b-256 ff58c481e92c2be85dc8f2dbcc343760bda30a7187e4ad9b0eaac67fc8132085

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