Configuration

A type-safe Pydantic configuration architecture; no legacy SQL pipeline feeds config or state.

Load Order

flowchart LR
    A["Defaults: defaults.py + Pydantic Field"] --> B["User settings file"] --> C["Project / custom config file"] --> D["MIXBOX_ environment variables"]
  • Config.load() merges these stages in order; later stages override earlier ones.
  • Selected GUI CLI flags (--host, --port) apply at their callsite after config load and sit outside this precedence chain.

Schema

Config domains are typed with Pydantic models in mixbox.config.models, which include AnalysisConfig, MixConfig, SystemConfig, GuiConfig, PathsConfig, and others.

Lifecycle API

The _global_config singleton lives in mixbox.config.config.

FunctionEffect
initialize_global_config(...)Creates and registers the validated configuration
get_config()Retrieves the singleton
update_global_config(update_dict)Recursively merges new values and re-validates the structure