runtimepy.net.server.struct package#

Module contents#

A module implementing a structure for tracking UI state and metrics.

class runtimepy.net.server.struct.UiState(name: str, config: dict[str, str | int | float | bool | None | dict[str, str | int | float | bool | None] | list[str | int | float | bool | None]], markdown: str = None)[source]#

Bases: RuntimeStruct, PsutilMixin

A sample runtime structure.

frame_period_ms: FloatPrimitive#
init_env() None[source]#

Initialize this sample environment.

json_metrics: ConnectionMetrics#
poll() None[source]#

A method that other runtime entities can call to perform canonical updates to this struct’s environment.

static singleton() UiState | None[source]#

Attempt to get the singleton UI struct instance.

time_ms: FloatPrimitive#
use_psutil: bool#