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.run_gateway import RunGatewayClient
from arp_standard_model import (
    NodeTypeRef,
    RunGatewayHealthRequest,
    RunGatewayStartRunRequest,
    RunStartRequest,
)

client = RunGatewayClient(base_url="http://127.0.0.1:8080", bearer_token="your-jwt")
health = client.health(RunGatewayHealthRequest())
run = client.start_run(
    RunGatewayStartRunRequest(
        body=RunStartRequest(
            root_node_type_ref=NodeTypeRef(
                node_type_id="example.com/node-types/my-root",
                version="1.0.0",
            ),
            input={"goal": "Hello, ARP"},
        )
    )
)

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., RunGatewayGetRunRequest, NodeRegistryListNodeTypesRequest) to avoid collisions. Request body models are also exported with a *RequestBody alias (e.g., RunStartRequestBody).

Response payloads

Client methods return the spec-defined payload objects directly (for example: Run, Health, VersionInfo) rather than service-specific *Response wrappers. For forward-compatible additions, use extensions (and metadata where available); arbitrary top-level fields are not allowed by the schemas (additionalProperties: false).

Wire format

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

Authentication (JWT Bearer)

client = RunGatewayClient(
    base_url="http://127.0.0.1:8080",
    bearer_token="your-jwt",
)

Streaming (NDJSON)

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

from arp_standard_client.run_gateway import RunGatewayClient
from arp_standard_model import RunGatewayStreamRunEventsParams, RunGatewayStreamRunEventsRequest

gateway = RunGatewayClient(base_url="http://127.0.0.1:8080", bearer_token="your-jwt")
text = gateway.stream_run_events(
    RunGatewayStreamRunEventsRequest(params=RunGatewayStreamRunEventsParams(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.3.5) 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.3.5.tar.gz (45.5 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.3.5-py3-none-any.whl (89.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: arp_standard_client-0.3.5.tar.gz
  • Upload date:
  • Size: 45.5 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.3.5.tar.gz
Algorithm Hash digest
SHA256 816382a7e8285a3c208c6cb18c419826e514c930a4a7c587b0c4d1c0bf77df12
MD5 b1c01840bb057cdcc1fa66390527c0d6
BLAKE2b-256 949d64671ac9b5926dce81b85e34542544c753d8d5529b4bd3ce08d3feb3a5ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for arp_standard_client-0.3.5.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.3.5-py3-none-any.whl.

File metadata

File hashes

Hashes for arp_standard_client-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 db16e4c799e5442f1cb2aa2a9a498c6d406ccfa6e1c1e478a2b8dff1b4c6c1e6
MD5 2d0ddb71a58b1878cb8e3b20cfcb5596
BLAKE2b-256 5e05c6e8cd706c935856695468b8536246f3560e9006baf1757819997d721e04

See more details on using hashes here.

Provenance

The following attestation bundles were made for arp_standard_client-0.3.5-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