Metadata-Version: 2.4
Name: arp-standard-server
Version: 0.2.1
Summary: FastAPI server scaffolding for the ARP Standard (v1).
Author: Agent Runtime Protocol
License-Expression: MIT
Project-URL: Repository, https://github.com/AgentRuntimeProtocol/ARP_Standard
Project-URL: Issues, https://github.com/AgentRuntimeProtocol/ARP_Standard/issues
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.110.0
Requires-Dist: arp-standard-model==0.2.1
Provides-Extra: dev
Requires-Dist: pyright>=1.1.0; extra == "dev"
Requires-Dist: pytest>=7; extra == "dev"
Dynamic: license-file

# ARP Standard Python Server (`arp-standard-server`)

FastAPI server scaffolding for implementing ARP components with spec-aligned request/response types.

## Install

```bash
python3 -m pip install arp-standard-server
```

## Usage

```python
from arp_standard_server.daemon import BaseDaemonServer
from arp_standard_model import DaemonCreateInstancesRequest, InstanceCreateRequestBody

class MyDaemon(BaseDaemonServer):
    async def create_instances(self, request: DaemonCreateInstancesRequest):
        body = request.body
        # business logic here
        return ...

app = MyDaemon().create_app()
```

## Service base classes

- `BaseRuntimeServer`
- `BaseToolRegistryServer`
- `BaseDaemonServer`

## Request objects

All server methods accept a single request object from `arp_standard_model`:

- `*Params` for path/query parameters
- `*RequestBody` for JSON bodies
- `*Request` wrappers with `params` and/or `body`

## Abstract method enforcement

Base server classes use `ABC` + `@abstractmethod`. Instantiating a class that does not implement all required endpoints raises a `TypeError` before the app is created.

## Authentication (API key)

```python
app = MyDaemon().create_app(api_key="your-api-key")
```

## Streaming (NDJSON)

NDJSON endpoints currently use plain text payloads. Streaming helpers are planned but not implemented yet.
