Skip to main content

Python SDK for EigenLake Cloud

Project description

EigenLake Python Client

Python SDK for EigenLake Cloud.

Install

pip install eigenlake

Quickstart

import eigenlake
from eigenlake import schema as s

with eigenlake.connect(
    url="https://api.eigenlake.dev",
    api_key="<sk_sbx_your_api_key_here>",
) as client:
    schema, index_options = (
        s.SchemaBuilder(additional_properties=False)
        .add("document_id", s.string(required=True, filterable=True))
        .add("text", s.string(filterable=False))
        .add("created_at", s.datetime(filterable=True))
        .build()
    )

    idx = client.indexes.create_or_get(
        namespace="demo-namespace",
        index="demo-index",
        dimensions=128,
        schema=schema,
        index_options=index_options,
    )

    record_id = idx.records.add(
        properties={"document_id": "doc-1", "text": "hello"},
        vector=[0.1] * 128,
    )

    result = idx.search.nearest(
        vector=[0.1] * 128,
        limit=3,
    )
    print(record_id, result)

Agent Query

import eigenlake

with eigenlake.connect(url="https://api.eigenlake.dev", api_key="<sk_sbx_your_api_key_here>") as client:
    idx = client.indexes.open(namespace="demo-automotive", index="automotive-fault-clustering")
    result = idx.agent.query("show me recent battery failures")
    print(result["filter"])

Docs

  • Documentation source: docs/
  • Docs site config: mkdocs.yml
pip install -e ".[docs]"
mkdocs serve

Docs will be available at http://127.0.0.1:8000.

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

eigenlake-0.2.2.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

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

eigenlake-0.2.2-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file eigenlake-0.2.2.tar.gz.

File metadata

  • Download URL: eigenlake-0.2.2.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for eigenlake-0.2.2.tar.gz
Algorithm Hash digest
SHA256 03a1c9416522289dfe2e10402aea876ef066afe85cefd7d6cc1b5da31b83ef43
MD5 299f3c823f0d62d424c37957fcb7c2f6
BLAKE2b-256 b5dd22c2f0adb5bffdf12fd42855f70ec6ad76d47ac4f3a8fac15c3bd90ebaa5

See more details on using hashes here.

File details

Details for the file eigenlake-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: eigenlake-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for eigenlake-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 63beae0e3c305bbbb23d2dd1d21cc6a6d26d7d70c71eb74dc1fbcb417820d43e
MD5 ea0764406e0815b2640ea671be8aa007
BLAKE2b-256 9207ef5037bb3275f116b2d1812698e71ccd755dd6df77ff6cd33886d3ac1ff2

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