Skip to main content

Python SDK for the Temporal Memory engine with local-first sidecar support.

Project description

Aletheia Python SDK

This package wraps the local Temporal Memory engine binary and the remote HTTP API with the same interface.

Local-first flow

from aletheia import AletheiaClient

client = AletheiaClient.from_local(auto_start=True)
client.ingest(entity_id="user-123", text="I prefer pourover coffee.")
hits = client.query("What coffee do I prefer?", entity_id="user-123")

Cloud flow

from aletheia import AletheiaClient

client = AletheiaClient.from_cloud(
    "http://143.110.246.15:3000",
    api_key="XXX1111AAA",
)

Binary resolution

from_local() and ensure_engine() resolve the engine in this order:

  1. Explicit binary_path
  2. ALETHEIA_ENGINE_BINARY or TEMPORAL_MEMORY_ENGINE_BINARY
  3. Repo-local target/release/temporal_memory or target/debug/temporal_memory
  4. Cached binary in ALETHEIA_ENGINE_CACHE_DIR
  5. Manifest download from ALETHEIA_ENGINE_MANIFEST_URL

Sidecar environment

The SDK starts the Rust engine with:

  • TEMPORAL_MEMORY_HOST
  • TEMPORAL_MEMORY_PORT
  • TEMPORAL_MEMORY_DATA_DIR
  • TEMPORAL_MEMORY_API_KEY when a local key is configured

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

aletheiadb-0.1.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

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

aletheiadb-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file aletheiadb-0.1.0.tar.gz.

File metadata

  • Download URL: aletheiadb-0.1.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for aletheiadb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c2c27375d27ccb1cbc9ec5ca308163b689804d634fdb98428c71f2d3f72e6801
MD5 de2f38f93cb819dbdb5953910b8d0d2c
BLAKE2b-256 f2883772ccbf98d0dc3d695c25c644b9a5c31453a46452ad43378719953b20ee

See more details on using hashes here.

File details

Details for the file aletheiadb-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: aletheiadb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for aletheiadb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d86d6a9583242736438ebdab2a125ec6433263a5e09654ed00fff5d26115b7b4
MD5 54d536b9dc0a36f6981dd79aca99f23d
BLAKE2b-256 073fa48bfb0cc1e03f6644d7937bdd8e9e0f69bd72519362de9edb2967dd0fab

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