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
StreamManagerof an embeddingdccd startprocess, so the UI reflects and controls the streams actually running. WhenNone(standalonedccd 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
HealthMonitorof an embeddingdccd startprocess. WhenNone(standalonedccd 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 startprocess. WhenNone, 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.