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

Uploaded Python 3

File details

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

File metadata

  • Download URL: aionis_sdk-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 a526c6c3746dba45c6026697019e69ddc5248ec630a5c16341d416760bceee81
MD5 9a9f5c4e854e7373ecf2dd8832172503
BLAKE2b-256 e2358d6aa14fdedda8f5388c3fcf1ed4a10da98a7fd0ef003afddd4207a8f146

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aionis_sdk-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6d716a3d5510dbae29290bfc6849d0ccbc4130b52c344c606c8a7564ba98feb0
MD5 6588a558b7912d7b3e4d44ee67770a83
BLAKE2b-256 869fbe6187e3dc09b1666786b361de41befeef45fd5a256c7b5e2613fce60d98

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