Skip to main content

Axilio Python SDK — manage workflows, runs, devices, usage, and control devices remotely

Project description

Axilio Python SDK

The official Python SDK for Axilio. One pip package covers account management, device discovery, allocation, and the full remote control surface (tap, swipe, OCR, screenshot, ...).

Installation

pip install axilio

Quick start

from axilio import Client

# Reads AXILIO_API_KEY from the environment.
client = Client()

# One-shot device session — allocate, connect, control, clean up.
with client.devices.session(platform="android") as device:
    device.tap(540, 1200)
    device.type("hello world")
    device.screenshot("after.png")

The same code runs unmodified inside an Axilio sandbox VM — when you schedule a workflow in the dashboard, Hephaestus injects scoped auth and the paired Atlas endpoint at boot, and the Client auto-detects sandbox mode. No if local: ... else: ... branches in your code.

Authentication

export AXILIO_API_KEY=ax_live_...

Or pass explicitly:

client = Client(api_key="ax_...")
client = Client(api_key="ax_...", base_url="https://staging-api.axilio.ai")

Generate keys from the Axilio dashboard. API keys are scoped to one organization — multi-org users mint one key per org.

Resources

Resource Methods Notes
client.billing balance(), subscription(), invoices(), upgrade(), downgrade() Reads everywhere; upgrade/downgrade local-only
client.usage metrics(), sessions() Both modes
client.api_keys list(), create(), revoke() Local-only
client.org current(), members(), invite(), remove_member() Reads everywhere; member writes local-only
client.devices available(), locations(), supported_apps(), allocate(), connect(), deallocate(), session() Sandbox mode short-circuits allocate()
client.workflows list(), get(), create(), update(), delete() Both modes
client.runs list(), get(), create(), cancel() Both modes

For the full method surface, type signatures, and the device control vocabulary, see the SDK design doc in the monorepo.

Errors

All errors raised by the SDK subclass axilio.AxilioError:

from axilio import Client, NotFoundError, RateLimitError, SandboxPermissionError

client = Client()

try:
    run = client.runs.get("run_does_not_exist")
except NotFoundError:
    print("run not found")
except RateLimitError:
    # backoff + retry
    ...
except SandboxPermissionError:
    # tried a local-only write from inside a sandbox VM
    ...
Exception HTTP Notes
UnauthorizedError 401 API key missing, malformed, or rejected
NotFoundError 404 Resource doesn't exist or isn't visible
RateLimitError 429 Retry after backoff
ServerError 5xx Transient; safe to retry
SandboxPermissionError Local-only operation attempted from sandbox
AllocationMismatchError Sandbox kwargs don't match the bound allocation
AxilioError other Catch-all

Configuration

Env var Description
AXILIO_API_KEY API key for authentication. Required in local mode.
AXILIO_BASE_URL Override the API host (defaults to https://api.axilio.ai).
AXILIO_SANDBOX_TOKEN Scoped sandbox token. Injected by Hephaestus inside a sandbox VM; not set in local mode.
AXILIO_ATLAS_ENDPOINT Paired Atlas endpoint inside a sandbox VM. Injected by Hephaestus.
Constructor kwarg Default Description
api_key AXILIO_API_KEY env, then AXILIO_SANDBOX_TOKEN (sandbox mode) Bearer token
base_url AXILIO_BASE_URL env, then https://api.axilio.ai API host
timeout 30.0 Request timeout in seconds
max_retries 3 Retry budget for 429 + 5xx (TODO: wire)
retry_base_delay 0.5 Exponential backoff base

Status

This is the v0 scaffold. The public surface (Client + resource classes) matches the design doc; method bodies are stubs (NotImplementedError) until codegen lands the typed wire calls. The codegen pipeline is driven by repository_dispatch from the monorepo's publish-sdk-spec job on each backend deploy — see .github/workflows/sdk-regenerate.yml (landing next).

What's not here

  • Async client — sync only for v0.
  • In-sandbox device drivers (the implementation that actually drives a phone screen) — those live inside Atlas + the runner image, not in this SDK.
  • SSE / WebSocket subscriptions for live run events — REST only; SSE lands when a consumer needs it.

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

axilio-0.1.2.tar.gz (125.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

axilio-0.1.2-py3-none-any.whl (240.7 kB view details)

Uploaded Python 3

File details

Details for the file axilio-0.1.2.tar.gz.

File metadata

  • Download URL: axilio-0.1.2.tar.gz
  • Upload date:
  • Size: 125.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for axilio-0.1.2.tar.gz
Algorithm Hash digest
SHA256 31c982134ef3d737d6a0439b21ce82acff33cffd447653598445744b6decea96
MD5 d889b3e7a995be0f38236d540cdecd72
BLAKE2b-256 8309f45766318a51a4ed0d3bdea848f92e9f7b606cf611937d2ac20dcf9374b3

See more details on using hashes here.

File details

Details for the file axilio-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: axilio-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 240.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for axilio-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3ee5ca4d9123f2c2f7abbde0f56a6b94596bddf0e44562726e789e7cd8faf9cf
MD5 d4014860829463bee901671495ee6c85
BLAKE2b-256 44b7ee1f7174309d916c3f4ee743e9be3ca887ed5904a3c5030b74ddce58eb71

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page