settings
Typed settings state model for AppState.
- class bedrock_server_manager.state.settings.SettingsRecord
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.settings.GeneralSettings(*, timezone: str = 'UTC')
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.settings.PathsSettings(*, servers: str = '', content: str = '', downloads: str = '', backups: str = '', plugins: str = '', themes: str = '')
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.settings.RetentionSettings(*, backups: Annotated[int, Ge(ge=0)] = 3, downloads: Annotated[int, Ge(ge=0)] = 3)
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.settings.MonitoringSettings(*, max_retries: Annotated[int, Ge(ge=0)] = 3, process_interval_sec: Annotated[int, Gt(gt=0)] = 10, player_interval_sec: Annotated[int, Gt(gt=0)] = 10, app_metrics_interval_sec: Annotated[int, Ge(ge=1), Le(le=3600)] = 3, bedrock_metrics_interval_sec: Annotated[int, Ge(ge=1), Le(le=3600)] = 3)
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.settings.SecuritySettings(*, require_admin_mfa: bool = False, auth_account_attempts: Annotated[int, Ge(ge=3), Le(le=100)] = 10, auth_peer_attempts: Annotated[int, Ge(ge=10), Le(le=10000)] = 60, auth_window_seconds: Annotated[int, Ge(ge=30), Le(le=3600)] = 300, auth_ipv6_prefix: Annotated[int, Ge(ge=48), Le(le=128)] = 128, session_idle_hours: Annotated[int, Ge(ge=1), Le(le=672)] = 24, session_max_days: Annotated[int, Ge(ge=1), Le(le=90)] = 28)
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.settings.WebSettings(*, cors_origins: tuple[str, ...] = (), outbound_queue_limit: Annotated[int, Ge(ge=1), Le(le=10000)] = 64, forwarded_allow_ips: str = '127.0.0.1', host: str = '127.0.0.1', port: Annotated[int, Ge(ge=1), Le(le=65535)] = 11325, token_expires_weeks: Annotated[int, Gt(gt=0)] = 4, jwt_secret_key: str | None = None, jwt_key_initialized: bool = False, frame_ancestors: str | None = None, csp_report_only: str | None = None)
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.settings.LifecycleSettings(*, server_stop_timeout_seconds: Annotated[float, Gt(gt=0), Le(le=600)] = 10.0, startup_timeout_seconds: Annotated[float, Gt(gt=0), Le(le=600)] = 30.0, shutdown_timeout_seconds: Annotated[float, Gt(gt=0), Le(le=600)] = 15.0, task_drain_timeout_seconds: Annotated[float, Gt(gt=0), Le(le=600)] = 30.0, plugin_timeout_seconds: Annotated[float, Gt(gt=0), Le(le=600)] = 10.0, cancellation_grace_seconds: Annotated[float, Gt(gt=0), Le(le=30)] = 2.0, request_drain_timeout_seconds: Annotated[float, Gt(gt=0), Le(le=600)] = 10.0)
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.settings.SchedulerSettings(*, max_concurrent_servers: Annotated[int, Ge(ge=1), Le(le=32)] = 4, poll_interval_seconds: Annotated[int, Ge(ge=1), Le(le=60)] = 60)
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.settings.BackupDestination(*, path: Annotated[str, MinLen(min_length=1)], enabled: bool = True, keep_count: Annotated[int, Ge(ge=0)] = 0, storage_budget_bytes: Annotated[int, Ge(ge=0)] = 0, min_free_bytes: Annotated[int, Ge(ge=0)] = 1073741824)
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.settings.BackupSchedule(*, enabled: bool = True, time: ~typing.Annotated[str, _PydanticGeneralMetadata(pattern='^(?:[01][0-9]|2[0-3]):[0-5][0-9]$')] = '03:00', timezone: str = 'UTC', weekdays: ~typing.Annotated[list[int], ~annotated_types.MinLen(min_length=1), ~annotated_types.MaxLen(max_length=7)] = <factory>, catch_up: bool = True, stagger_minutes: ~typing.Annotated[int, ~annotated_types.Ge(ge=0), ~annotated_types.Le(le=120)] = 15)
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.settings.ScheduledTask(*, enabled: bool = True, time: ~typing.Annotated[str, _PydanticGeneralMetadata(pattern='^(?:[01][0-9]|2[0-3]):[0-5][0-9]$')] = '03:00', timezone: str = 'UTC', weekdays: ~typing.Annotated[list[int], ~annotated_types.MinLen(min_length=1), ~annotated_types.MaxLen(max_length=7)] = <factory>, catch_up: bool = True, stagger_minutes: ~typing.Annotated[int, ~annotated_types.Ge(ge=0), ~annotated_types.Le(le=120)] = 15, task: ~typing.Annotated[str, ~annotated_types.MaxLen(max_length=160), _PydanticGeneralMetadata(pattern='^(backup|verify|[a-zA-Z0-9_.-]+:[a-zA-Z0-9_.-]+)$')], server_name: ~typing.Annotated[str, ~annotated_types.MinLen(min_length=1), ~annotated_types.MaxLen(max_length=160)], options: dict[str, ~pydantic.types.JsonValue] = <factory>)
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.settings.BackupSettings(*, readiness_max_age_hours: ~typing.Annotated[int, ~annotated_types.Ge(ge=1), ~annotated_types.Le(le=8760)] = 48, recovery_drill_interval_hours: ~typing.Annotated[int, ~annotated_types.Ge(ge=0), ~annotated_types.Le(le=8760)] = 0, encryption: bool = False, mode: ~typing.Literal['world', 'selected', 'full'] = 'selected', components: ~typing.Annotated[list[~typing.Literal['world', 'server.properties', 'allowlist.json', 'permissions.json', 'script_config', 'bsm_settings', 'behavior_packs', 'resource_packs', 'development_behavior_packs', 'development_resource_packs']], ~annotated_types.MinLen(min_length=1), ~pydantic.functional_validators.AfterValidator(func=~bedrock_server_manager.backups.contents.unique_components)] = <factory>, compression: ~typing.Literal['fast', 'balanced', 'small'] = 'balanced', verify_after_create: bool = False, verification_interval_hours: ~typing.Annotated[int, ~annotated_types.Ge(ge=0), ~annotated_types.Le(le=8760)] = 0, safety_window_hours: ~typing.Annotated[int, ~annotated_types.Ge(ge=1), ~annotated_types.Le(le=8760)] = 168, keep_daily: ~typing.Annotated[int, ~annotated_types.Ge(ge=0), ~annotated_types.Le(le=365)] = 0, keep_weekly: ~typing.Annotated[int, ~annotated_types.Ge(ge=0), ~annotated_types.Le(le=520)] = 0, keep_monthly: ~typing.Annotated[int, ~annotated_types.Ge(ge=0), ~annotated_types.Le(le=120)] = 0, storage_budget_bytes: ~typing.Annotated[int, ~annotated_types.Ge(ge=0)] = 0, destinations: dict[str, ~bedrock_server_manager.state.settings.BackupDestination] = <factory>, max_files: ~typing.Annotated[int, ~annotated_types.Ge(ge=1), ~annotated_types.Le(le=1000000)] = 1000000, max_expanded_bytes: ~typing.Annotated[int, ~annotated_types.Ge(ge=1)] = 1099511627776, max_archive_bytes: ~typing.Annotated[int, ~annotated_types.Ge(ge=1)] = 1099511627776)
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bedrock_server_manager.state.settings.SettingsState(*, general: GeneralSettings = <factory>, scheduler: SchedulerSettings = <factory>, paths: PathsSettings = <factory>, retention: RetentionSettings = <factory>, backups: BackupSettings = <factory>, monitoring: MonitoringSettings = <factory>, web: WebSettings = <factory>, security: SecuritySettings = <factory>, lifecycle: LifecycleSettings = <factory>, diagnostics: DiagnosticOptions = <factory>, events: EventOptions = <factory>, custom: Dict[str, ~pydantic.types.JsonValue]=<factory>, plugin_settings: Dict[str, ~typing.Dict[str, ~pydantic.types.JsonValue]]=<factory>)
- model_config = {'allow_inf_nan': False, 'extra': 'forbid', '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].
- classmethod create_defaults(data_dir: str) SettingsState
Create a default SettingsState instance configured for a given data directory.
- get(key: str, default: Any = None) Any
Return a setting value using dot-notation for nested access.
- set(key: str, value: Any) bool
Validate a complete updated snapshot before mutating live settings.
- to_dict() Dict[str, Any]
Export settings state into a dictionary matching database key/value structure.
- classmethod from_dict(data: Dict[str, Any], data_dir: str | None = None) SettingsState
Reconstructs SettingsState from a dictionary (e.g. from database key/value settings).
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Args:
self: The BaseModel instance. context: The context.