Skip to main content

Python SDK for Aionis Memory Graph API

Project description

aionis-sdk

Python SDK for Aionis Memory Graph API.

Install

pip install aionis-sdk

Usage

import os
from aionis_sdk import AionisClient

client = AionisClient(
    base_url="http://localhost:3001",
    timeout_s=10.0,
    api_key=os.getenv("API_KEY"),           # optional: X-Api-Key
    auth_bearer=os.getenv("AUTH_BEARER"),   # optional: Authorization: Bearer <token>
    admin_token=os.getenv("ADMIN_TOKEN"),   # optional: X-Admin-Token
)

out = client.write(
    {
        "scope": "default",
        "input_text": "python sdk write",
        "auto_embed": False,
        "nodes": [{"client_id": "py_evt_1", "type": "event", "text_summary": "hello python sdk"}],
        "edges": [],
    }
)

print(out["status"], out["request_id"], out["data"]["commit_id"])

Auth Options

  1. api_key: sends X-Api-Key.
  2. auth_bearer: sends Authorization: Bearer <token>.
  3. admin_token: sends X-Admin-Token (debug/admin flows).

Covered methods

  1. write
  2. recall
  3. recall_text
  4. rules_evaluate
  5. tools_select
  6. tools_feedback

Error model

  1. AionisApiError: API returned non-2xx response.
  2. AionisNetworkError: request timeout/network failure.

Smoke

cd /Users/lucio/Desktop/Aionis
set -a; source .env; set +a
npm run sdk:py:smoke

Build check (repo local)

cd /Users/lucio/Desktop/Aionis
npm run sdk:py:compile
npm run sdk:py:release-check

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

aionis_sdk-0.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

aionis_sdk-0.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for aionis_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5179f17434c45e8fa10d9e2ebb9c9bb487852bca4efd585673ca22a996293dda
MD5 1b5c4dcc1679d8cb1b6e8111fbbd0522
BLAKE2b-256 f0be8fd9230727c10dc031a0f32a132a08af954737b6d3ae1f9728343374994f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for aionis_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb1663f3a6044d317ff633d94d4c39f546a53cb7d33187b995c3492cffcf33c8
MD5 edb8c90db810bb1a3c31a6d6544f29be
BLAKE2b-256 039a95540a7f0d8600e3a8700f635afd6003b2e0f8fdfaa37a79d389ea17ff7c

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