Python client
Use Arc0 discovery, hosted connections and versioned execution from Python.
The Python source package lives in packages/sdk-python. It uses Python 3.10 or later
and the standard library. A PyPI release is not yet published. After publication use python -m pip install arc0-sdk. From a source checkout:
python -m pip install ./packages/sdk-pythonimport os
from uuid import uuid4
from arc0 import Arc0
arc0 = Arc0(
base_url=os.environ['ARC0_API_URL'],
api_key=os.environ['ARC0_API_KEY'],
)
tools = arc0.search(query='public repository')['tools']
tool = next(t for t in tools if t['action'] == 'github.get_public_repository')
definition = arc0.search(action=tool['action'], version=tool['version'])
receipt = arc0.execute(
action=tool['action'],
action_version=tool['version'],
arguments={'owner': 'octocat', 'repo': 'Hello-World'},
idempotency_key=str(uuid4()),
)Keep keys server-side. Self-bound keys identify one person; business keys require an
explicit end_user_id on the client. That identity is applied to discovery, connections,
execution and receipt retrieval.
connect('github') creates a hosted setup link. get_execution(id) reads a receipt.
wait_for_execution(id) polls pending work and returns immediately when human approval
or another terminal state is reached. It never retries execution automatically.
Persist the idempotency key with your job and reuse it only with identical arguments. An uncertain provider write needs reconciliation before a new request. Authentication and authorization errors remain errors; the client does not switch credentials or users. HTTPS is required outside localhost, and HTTP redirects are rejected.
Python currently has no user-upsert, connection-list/revoke or embedded-management ticket helpers. Use the REST endpoints for those operations, or the TypeScript client. Both packages are prepared at 0.2.0; the matching version does not imply identical method coverage.