Metadata-Version: 2.5
Name: arkitekt-fastapi
Version: 1.0.0
Summary: server mode for an Arkitekt app: serve a declared app over HTTP with FastAPI
Author-email: jhnnsrs <jhnnsrs@gmail.com>
License-Expression: MIT
Requires-Python: >=3.11
Requires-Dist: aiosqlite>=0.19
Requires-Dist: arkitekt-runtime>=1.0.2
Requires-Dist: arkitekt-spec>=1.1.1
Requires-Dist: fastapi>=0.100
Requires-Dist: httpx>=0.27
Requires-Dist: jsonpatch>=1.33
Requires-Dist: koil>=3.3.3
Requires-Dist: pydantic>=2.11
Description-Content-Type: text/markdown

# arkitekt-fastapi

Server mode for an Arkitekt app: serve an app declared with [arkitekt-spec](../arkitekt-spec)
as an HTTP service.

```python
from fastapi import FastAPI
from arkitekt_fastapi import configure_fastapi

app = FastAPI()
configure_fastapi(app=app, app_registry=registry, db_file="journal.db")
```

Every declared action becomes a route with an OpenAPI schema generated from its ports; states,
locks, tasks and the journal are served alongside. It runs actions on
[arkitekt-runtime](../arkitekt-runtime)'s execution core, the same one
[rekuest](../rekuest)'s distributed agent uses, but with an in-process transport: no
websockets, no rath, no rekuest server.

A served app registers with no one and so cannot call other actions: `Task.call` raises
`NoCallerError` at once.

`AsyncAgentTestClient` drives a served app in tests without a network.
