yera.ui.server

Local server for running Yera apps with the web UI.

Symbols

class ServerLaunchConfig — Configure behavior when entering a Yera server.
class YeraServer — ASGI server wrapper that handles event routing and HTTP interfaces for Yera apps.

ServerLaunchConfig

Configure behavior when entering a Yera server.

YeraServer

Inherits: uvicorn.Server

ASGI server wrapper that handles event routing and HTTP interfaces for Yera apps.

Methods

handle_exit — Handles server exit signals by stopping all active session executors.
__aenter__ — Asynchronous context manager entry point. Starts the uvicorn server.
__aexit__ — Asynchronous context manager exit point. Shuts down the server and logs.

YeraServer.handle_exit

handle_exit(
    sig: int,
    frame: FrameType | None,
) → None

Handles server exit signals by stopping all active session executors.

Parameters

sig
type: int

The signal number.

frame
type: FrameType | None

The current stack frame.

YeraServer.__aenter__

__aenter__() → YeraServer

Asynchronous context manager entry point. Starts the uvicorn server.

Returns

type: YeraServer

The initialised YeraServer instance.

YeraServer.__aexit__

__aexit__(
    exc_type: type[BaseException] | None,
    exc_val: BaseException | None,
    exc_tb: TracebackType | None,
) → None

Asynchronous context manager exit point. Shuts down the server and logs.

Parameters

exc_type
type: type[BaseException] | None

Exception type if an error occurred.

exc_val
type: BaseException | None

Exception value if an error occurred.

exc_tb
type: TracebackType | None

Traceback if an error occurred.