Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.argalabs.com/llms.txt

Use this file to discover all available pages before exploring further.

Error handling

from arga_sdk import Arga, ArgaAPIError, ArgaError

client = Arga(api_key="arga_sk_...")

try:
    detail = client.runs.get("nonexistent")
except ArgaAPIError as e:
    print(e.status_code)  # 404
    print(e.message)      # "Not found"
except ArgaError as e:
    # Base class for all SDK errors (network issues, etc.)
    print(e.message)

Context managers

Both clients support with blocks for automatic cleanup:
with Arga(api_key="arga_sk_...") as client:
    run = client.runs.create_url_run(url="https://staging.myapp.com")

async with AsyncArga(api_key="arga_sk_...") as client:
    run = await client.runs.create_url_run(url="https://staging.myapp.com")