The official Python Client for the Arato API for testing, experimenting, and evaluating LLM-based applications.
Project description
Arato Python SDK
The official Python SDK for the Arato API.
Arato is a platform for testing, experimenting, and evaluating LLM-based applications. This library provides a convenient, developer-friendly interface for interacting with Arato resources programmatically.
Installation
Install the SDK from PyPI using pip:
pip install arato-client
Or, to install from source, navigate to the root directory of this project (where pyproject.toml is located) and run:
pip install .
Usage
First, ensure you have your Arato API key. You can pass it directly to the client or set it as an environment variable named ARATO_API_KEY.
Synchronous Client
import os
from arato_client import AratoClient, NotFoundError
# Initialize the client (automatically uses ARATO_API_KEY env var)
# If the environment variable is not set, pass the key directly:
# client = AratoClient(api_key="your-arato-api-key")
client = AratoClient()
# List all notebooks
try:
notebooks_response = client.notebooks.list()
notebooks = notebooks_response.get('notebooks', [])
print(f"Found {len(notebooks)} notebooks.")
if notebooks:
notebook_id = notebooks['id']
# List experiments for the first notebook
experiments_response = client.notebooks.experiments.list(notebook_id=notebook_id)
experiments = experiments_response.get('experiments', [])
print(f"Found {len(experiments)} experiments in notebook {notebook_id}.")
except NotFoundError as e:
print(f"Error: A resource was not found. {e}")
except Exception as e:
print(f"An unexpected error occurred: {e}")
Asynchronous Client
The SDK also provides an async client for use with asyncio.
import asyncio
from arato_client import AsyncAratoClient
async def main():
async with AsyncAratoClient() as client:
# List all notebooks
notebooks_response = await client.notebooks.list()
notebooks = notebooks_response.get('notebooks', [])
print(f"Found {len(notebooks)} notebooks.")
if __name__ == "__main__":
# Ensure ARATO_API_KEY is set in your environment before running
if os.getenv("ARATO_API_KEY"):
asyncio.run(main())
else:
print("Please set the ARATO_API_KEY environment variable.")
See example.py for a more detailed demonstration of the SDK's capabilities.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arato_client-1.0.6.tar.gz.
File metadata
- Download URL: arato_client-1.0.6.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2d573d327103276b0e109163357ab201288a8c2a137908645e57bb2264c6565
|
|
| MD5 |
2d620ae0682cfad6550dba5dce6ed399
|
|
| BLAKE2b-256 |
73bd391155783a0031efe050b5bd71d4b5fb8a1a761233eb179df17744f23028
|
Provenance
The following attestation bundles were made for arato_client-1.0.6.tar.gz:
Publisher:
publish.yml on AratoAi/arato-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arato_client-1.0.6.tar.gz -
Subject digest:
d2d573d327103276b0e109163357ab201288a8c2a137908645e57bb2264c6565 - Sigstore transparency entry: 633560117
- Sigstore integration time:
-
Permalink:
AratoAi/arato-python-sdk@7be881ffa13cd29c726aced4c849f0f93c54ee79 -
Branch / Tag:
refs/tags/v1.0.6 - Owner: https://github.com/AratoAi
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7be881ffa13cd29c726aced4c849f0f93c54ee79 -
Trigger Event:
release
-
Statement type:
File details
Details for the file arato_client-1.0.6-py3-none-any.whl.
File metadata
- Download URL: arato_client-1.0.6-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e7cf7041db58f0651840ff9182eaf2f5564910c65d279a7495ee4bb6813d768
|
|
| MD5 |
80a29632d3301ef0b22050361c3a9103
|
|
| BLAKE2b-256 |
cd9758e55e922c3140376c0fc339b83690fe7283211aafde473ff8f2c0b9ea83
|
Provenance
The following attestation bundles were made for arato_client-1.0.6-py3-none-any.whl:
Publisher:
publish.yml on AratoAi/arato-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arato_client-1.0.6-py3-none-any.whl -
Subject digest:
8e7cf7041db58f0651840ff9182eaf2f5564910c65d279a7495ee4bb6813d768 - Sigstore transparency entry: 633560154
- Sigstore integration time:
-
Permalink:
AratoAi/arato-python-sdk@7be881ffa13cd29c726aced4c849f0f93c54ee79 -
Branch / Tag:
refs/tags/v1.0.6 - Owner: https://github.com/AratoAi
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7be881ffa13cd29c726aced4c849f0f93c54ee79 -
Trigger Event:
release
-
Statement type: