cremalink.local_server_app.api module

This module defines the aiohttp application for the local proxy server. It creates all the API endpoints, manages application state, and handles the startup and shutdown of background services.

cremalink.local_server_app.api.LOCAL_STATE_KEY: AppKey[LocalServerState] = <AppKey(cremalink.local_server_app.api.local_state, type=<<Unknown>>)>

Typed keys for app-level storage (tests/introspection), mirroring the previous FastAPI app.state.* pattern.

cremalink.local_server_app.api.create_app(settings: ServerSettings | None = None, device_adapter: DeviceAdapter | None = None, logger=None) → Application[source]

Application factory for the aiohttp server.

Initializes all components (state, settings, adapter, jobs) and wires up the API routes and startup/cleanup handlers.

Returns:

A configured aiohttp Application instance.