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.1.tar.gz (12.9 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.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: eigenlake-0.2.1.tar.gz
  • Upload date:
  • Size: 12.9 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.1.tar.gz
Algorithm Hash digest
SHA256 27c93229eff6365a77cf1aa45d2db7babbb7222e1472f51840688987afebdeb0
MD5 1b78d6b74b6b3ce70d6b388f278f0aa1
BLAKE2b-256 59e905cf4c1ba6d52498105656147daa548f6e658be889507e98491199b0e55e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: eigenlake-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 8.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e77bed436d93ac06c196c3d46da5b1834a640fd7a4e111fc2551427f77d64d98
MD5 ff611c4996693eab0e925ac108ac138b
BLAKE2b-256 f91751c9efeae7a6d6bc0a7769fb2c9df1c6565009ad8f3af07b38c44502a593

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