create_app

Defined in dccd.daemon.api

create_app(cfg_path, stream_manager=None, health=None, scheduler=None)[source]

Build the FastAPI application for cfg_path.

Parameters:
cfg_pathstr or pathlib.Path

Path to the YAML daemon configuration file.

stream_managerStreamManager, optional

The live StreamManager of an embedding dccd start process, so the UI reflects and controls the streams actually running. When None (standalone dccd ui), a fresh, non-started manager is created — its configured stream jobs appear stopped until the user starts them from the UI.

healthHealthMonitor, optional

The live HealthMonitor of an embedding dccd start process. When None (standalone dccd ui), a fresh monitor is created — constructing it wires file logging (.dccd/dccd.log) and metrics so the Logs/Dashboard pages have data to show.

schedulerBackgroundScheduler, optional

The live histo scheduler of an embedding dccd start process. When None, a non-started one is built so the UI can start/stop periodic collection itself.

Returns:
fastapi.FastAPI

Configured application with the JSON API (/api/*) and the htmx web UI pages mounted.