models
Typed domain state models for ServerState, PluginState, UserState, SchedulerState, and RuntimeState.
- bedrock_server_manager.state.models.json_equal(left: object, right: object) bool
Compare validated JSON snapshots without Python’s bool/int equality alias.
- class bedrock_server_manager.state.models.PersistentRecord
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'hide_input_in_errors': True, 'revalidate_instances': 'always', 'strict': True, 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.models.EntityStateMap(_items: Dict[str, ~T]=<factory>)
- class bedrock_server_manager.state.models.ServerConfigState(*, server_name: str, installed_version: str = 'UNKNOWN', status: str = 'UNKNOWN', autoupdate: bool = False, autostart: bool = False, target_version: str = 'UNKNOWN', custom: Dict[str, ~pydantic.types.JsonValue]=<factory>)
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'hide_input_in_errors': True, 'revalidate_instances': 'always', 'strict': True, 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.models.ServerState(_items: Dict[str, ~T]=<factory>)
- property servers: Dict[str, ServerConfigState]
Read-only snapshots; use set() and remove() to mutate live state.
- class bedrock_server_manager.state.models.PluginInfoState(*, plugin_name: str, enabled: bool = False, version: str | None = None, author: str | None = None, description: str | None = None)
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'hide_input_in_errors': True, 'revalidate_instances': 'always', 'strict': True, 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.models.PluginState(_items: Dict[str, ~T]=<factory>)
- property plugins: Dict[str, PluginInfoState]
Read-only snapshots; use set() and remove() to mutate live state.
- class bedrock_server_manager.state.models.UserInfoState(*, id: int | None = None, username: str, role: Literal['admin', 'moderator', 'user'] = 'user', theme: str = 'default', is_active: bool = True, full_name: str | None = None, email: str | None = None)
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'hide_input_in_errors': True, 'revalidate_instances': 'always', 'strict': True, 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.models.UserState(_items: Dict[str, ~T]=<factory>)
- property users: Dict[str, UserInfoState]
Read-only snapshots; use set() and remove() to mutate live state.
- class bedrock_server_manager.state.models.SchedulerState(_records: dict[str, tuple[dict[str, ~typing.Any], dict[str, ~typing.Any], str | None]] = <factory>)
Committed scheduler read model; all writes go through Storage transactions.
- class bedrock_server_manager.state.models.BanItem(*, player_name: str, xuid: str, reason: str | None = None, banned_at: str | None = None)
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'hide_input_in_errors': True, 'revalidate_instances': 'always', 'strict': True, 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.models.RuntimePlayer(*, name: str, xuid: str)
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'hide_input_in_errors': True, 'revalidate_instances': 'always', 'strict': True, 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.models.ServerRuntimeInfo(*, running: bool = False, pid: Annotated[int | None, ~annotated_types.Gt(gt=0)] = None, players_available: bool = True, players_online: Annotated[int, ~annotated_types.Ge(ge=0)] = 0, players: List[RuntimePlayer] = <factory>, cpu_percent: Annotated[float, ~annotated_types.Ge(ge=0)] = 0.0, memory_mb: Annotated[float, ~annotated_types.Ge(ge=0)] = 0.0)
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'hide_input_in_errors': True, 'revalidate_instances': 'always', 'strict': True, 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.models.RuntimeState(scheduler: dict[str, JsonValue]=<factory>, _servers: Dict[str, bedrock_server_manager.state.models.ServerRuntimeInfo]=<factory>)
- update_server_runtime(server_name: str, **values: object) None
Validate and publish one complete runtime update without exposing handles.