nat.front_ends.fastapi.fastapi_front_end_controller#

Attributes#

Classes#

_FastApiFrontEndController

_FastApiFrontEndController class controls the spawing and tear down of the API server in environments where

Module Contents#

logger#
class _FastApiFrontEndController(app: fastapi.FastAPI)#

_FastApiFrontEndController class controls the spawing and tear down of the API server in environments where the server is needed and not already running.

_app: fastapi.FastAPI#
_server: uvicorn.Server | None = None#
_server_background_task: asyncio.Task | None = None#
async start_server(host: str, port: int) None#

Starts the API server.

async stop_server() None#

Stops the API server.