Skip to main content

Python client package for the ARP Standard (v1).

Project description

ARP Standard Python Client (arp-standard-client)

Install

python3 -m pip install arp-standard-client

Usage

from arp_standard_client.daemon import DaemonClient
from arp_standard_model import (
    DaemonCreateInstancesRequest,
    DaemonHealthRequest,
    DaemonListInstancesRequest,
    DaemonListRunsParams,
    DaemonListRunsRequest,
    InstanceCreateRequestBody,
)

client = DaemonClient(base_url="http://127.0.0.1:8082")
health = client.health(DaemonHealthRequest())
instances = client.list_instances(DaemonListInstancesRequest())
created = client.create_instances(
    DaemonCreateInstancesRequest(
        body=InstanceCreateRequestBody(runtime_profile="default", count=1)
    )
)
runs = client.list_runs(DaemonListRunsRequest(params=DaemonListRunsParams(page_size=50)))

Request objects

All facade methods require a single request object from arp_standard_model. These request objects wrap:

  • params: path/query parameters (if any)
  • body: JSON request body (if any)

Request and params models are service-prefixed (e.g., DaemonListRunsRequest, RuntimeGetRunStatusRequest) to avoid collisions. Request body models are also exported with a *RequestBody alias (e.g., InstanceCreateRequestBody).

Wire format

Models use the exact JSON field names from the spec (no aliasing). When serializing manually, use model_dump(exclude_none=True).

Authentication (API key)

client = DaemonClient(
    base_url="http://127.0.0.1:8082",
    headers={"X-API-Key": "your-api-key"},
)

Streaming (NDJSON)

Streaming endpoints currently return NDJSON as plain text. Helpers are planned but not implemented yet.

from arp_standard_client.runtime import RuntimeClient
from arp_standard_model import RuntimeStreamRunEventsParams, RuntimeStreamRunEventsRequest

runtime = RuntimeClient(base_url="http://127.0.0.1:8081")
text = runtime.get_run_events(
    RuntimeStreamRunEventsRequest(params=RuntimeStreamRunEventsParams(run_id=run_id))
)
for line in text.splitlines():
    if not line:
        continue
    # json.loads(line)

Spec reference

arp_standard_client.SPEC_REF exposes the spec tag (for example, spec/v1@v0.2.2) used to generate the package.

See also

General Documentation

Python Specific Documentation

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

arp_standard_client-0.2.2.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

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

arp_standard_client-0.2.2-py3-none-any.whl (52.1 kB view details)

Uploaded Python 3

File details

Details for the file arp_standard_client-0.2.2.tar.gz.

File metadata

  • Download URL: arp_standard_client-0.2.2.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for arp_standard_client-0.2.2.tar.gz
Algorithm Hash digest
SHA256 c5f381e0e21bb90f47975bc60fdf5f3b952d9256c849c2ef2758db3faa670a80
MD5 5dbd39f68d7d07e276d5649274af37e1
BLAKE2b-256 1b6cc06f2ceb192e7bfdff1102f5edb4a401f938ae8226d7c06f23d29a130a58

See more details on using hashes here.

Provenance

The following attestation bundles were made for arp_standard_client-0.2.2.tar.gz:

Publisher: release.yml on AgentRuntimeProtocol/ARP_Standard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arp_standard_client-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for arp_standard_client-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c5725910a9bd2fcbee690d3ea2673a4100bcc3a6af3e5167050223478bf5693f
MD5 5d85e4229f90a1b7d858339d3e75506f
BLAKE2b-256 d82bfcf703a26149205757088c6dd3e3af75ffc8d9d649d1f604a9af489cd8b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for arp_standard_client-0.2.2-py3-none-any.whl:

Publisher: release.yml on AgentRuntimeProtocol/ARP_Standard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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