pi_portal.modules.tasks.api.router.RouterFactory

class pi_portal.modules.tasks.api.router.RouterFactory(scheduler: TaskScheduler)[source]

Bases: object

Create a populated FastAPI router from the task registry.

Parameters:

scheduler (TaskScheduler) – The scheduler instance the API is provided for.

__init__(scheduler: TaskScheduler) None[source]
create() APIRouter[source]

Create and populate a FastAPI router using the task registry.

Returns:

The populated router.

Return type:

APIRouter