Python SDK

The official Elydora SDK for Python 3.9+. Supports both sync and async usage patterns.

Installation

bash
pip install elydora

Quick Start

python
from elydora import ElydoraClient

client = ElydoraClient(
    org_id="org_acme",
    agent_id="agent_underwriter",
    private_key=os.environ["ELYDORA_KEY"],
)

Register an Agent

python
agent = client.register_agent(
    agent_id="agent_underwriter",
    public_key=public_key_base64,
    label="Loan Underwriter v2",
)

print(agent.status)  # 'active'

Submit an Operation

python
record = client.create_operation(
    operation_type="loan.approve",
    payload={"loanId": "LN-2026-001", "amount": 50000},
)

receipt = client.submit_operation(record)

print(receipt.ear.receipt_id)  # 'rcpt_xyz789'
print(receipt.ear.seq_no)      # 42
print(receipt.ech.chain_hash)  # 'sha256:...'

Verify an Operation

python
result = client.verify_operation(operation_id)

print(result.valid)               # True
print(result.checks.signature)    # True
print(result.checks.chain_hash)   # True

Async Usage

python
from elydora import AsyncElydoraClient

client = AsyncElydoraClient(
    org_id="org_acme",
    agent_id="agent_underwriter",
    private_key=os.environ["ELYDORA_KEY"],
)

receipt = await client.submit_operation(record)

Error Handling

python
from elydora.exceptions import ElydoraError

try:
    client.submit_operation(record)
except ElydoraError as e:
    print(e.code)     # 'AGENT_FROZEN'
    print(e.message)  # 'Agent is frozen...'

Configuration Options