Python SDK

Official Python SDK for ATHENA Trust Calibration Platform.

Installation

pip install athena-sdk

Optional: Async Support with HTTP/2

pip install athena-sdk[async]

Quick Start

from athena import Athena

athena = Athena(api_key="ak_xxx")
result = athena.bias.detect(
    user_id="user_123",
    action_taken="approved",
    ai_recommended="approved"
)
print(f"Bias: {result.bias_detected}, Risk: {result.risk_level}")

Features

  • Sync + Async - Both Athena and AsyncAthena clients

  • Type Safety - Full Pydantic v2 models with validation

  • Auto-Retry - Exponential backoff with rate limit handling

  • Webhook Verification - HMAC-SHA256 signature validation

  • Framework Support - Flask, FastAPI, Django decorators

  • Zero Config - Works out of the box with sensible defaults

Configuration

API Reference

Bias Detection

Trust Calibration

Trust Score

Audit Trail

Webhooks

Compliance Exports

Async Client

For high-performance applications:

Webhook Verification

Flask

FastAPI

Manual Verification

Available Resources

Resource
Methods
Description

athena.calibrate

analyze(), get_status()

Trust calibration analysis

athena.bias

detect(), is_present()

Cognitive bias detection

athena.trust_score

calculate(), trend()

Trust score calculation

athena.audit

list()

Audit trail access

athena.webhooks

create(), list(), update(), delete()

Webhook management

athena.export

generate(), get_templates()

Compliance reports

athena.stats

get()

Aggregated metrics

athena.users

at_risk()

At-risk user detection

athena.engines

status(), benchmarks()

System status & performance

Error Handling

Support

License

MIT © ATHENA

Last updated