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

Uploaded Python 3

File details

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

File metadata

  • Download URL: eigenlake-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 7338dfa42ff5416ae9d8a3b5315b19be2d3d98987583de8a531dba8803542f7c
MD5 1b0fb574e8e1df22061c62b09cec418c
BLAKE2b-256 5c61631332cf7a5fdc4af8a58e727c341f761987c456bb48ab6d5091ef322219

See more details on using hashes here.

File details

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

File metadata

  • Download URL: eigenlake-0.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 11e94018dacde8b412e536f16bd08986f87503d8a5fe4c15ece367935da7b21c
MD5 94107d52caf84850383e487e100a6d51
BLAKE2b-256 48c5202b52996b897b0324ed152bdc9ca52d977d4182dd8a07a7fe0e6beb66ff

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