Registry / llm-agents / athina-client

athina-client

JSON →
library0.2.11pypypiunverified

Athina Client is a lightweight Python SDK designed to interact with Athina's datasets and API. It enables users to log LLM inferences, evaluations, and experiments for monitoring, analysis, and debugging AI applications. The current version is 0.2.11, with new releases occurring regularly, typically a few times a month, especially for minor fixes and feature additions.

pip install athina-client
INSTALL
IMPORT
SIG · ATHINA-CLIENT
A
athina-client
llm-agentspythonv0.2.11
Install
2.3s avg
Import
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.2.11 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 21.7MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.3s · import 0.000s · 22MB
20MB installed
● package 20MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AthinaClient
from athina_client import AthinaClient
from athina_client import AthinaClient

This quickstart demonstrates how to initialize the Athina client and use its core functionality to log an LLM inference and a corresponding evaluation. Ensure the ATHINA_API_KEY environment variable is set.

import os from athina.client import AthinaClient # Initialize the Athina client with your API key athina_client = AthinaClient(api_key=os.environ.get("ATHINA_API_KEY", "")) # Example 1: Log an inference try: response = athina_client.log_inference( prompt="What is the capital of France?", response="Paris", external_reference_id="my-app-inference-123", user_query="Capital question" ) print(f"Inference logged successfully: {response.json()}") except Exception as e: print(f"Error logging inference: {e}") # Example 2: Log a simple evaluation try: response = athina_client.log_evaluation( external_reference_id="my-app-evaluation-456", metric="correctness", score=1, # 1 for correct, 0 for incorrect details="The response was accurate.", language_model_id="gpt-4" ) print(f"Evaluation logged successfully: {response.json()}") except Exception as e: print(f"Error logging evaluation: {e}")
Debug
Known issues
breakingThe methods `log_inference` and `log_evaluation` were moved from directly under the `athina` module to be methods of the `AthinaClient` instance. If you were calling `athina.log_inference(...)`, you now need an instantiated client: `athina_client.log_inference(...)`.
fix
Initialize `athina_client = AthinaClient(...)` and call methods like `athina_client.log_inference(...)`.
affects: >=0.2.0
gotchaFailure to set the `ATHINA_API_KEY` environment variable or pass it directly to `AthinaClient(api_key=...)` will result in authentication errors (401 Unauthorized) when making API calls.
fix
Set `export ATHINA_API_KEY='your-api-key'` in your environment or explicitly pass it during client initialization: `AthinaClient(api_key='your-api-key')`.
affects: All versions
breakingThe `log_experiment` method in `AthinaClient` removed the `batch_size` parameter.
fix
Remove the `batch_size` argument if you are calling `log_experiment`.
affects: >=0.2.10
Upgrade
Version history
0.2.11latest on PyPI · released Apr 28, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
44 hits · last 30 days
node
38
Perplexity
1
OpenAI (training)
1
Resources