aiq.settings.global_settings#

Attributes#

Classes#

Settings

Subclass of a Pydantic BaseModel that is hashable. Use in objects that need to be hashed for caching purposes.

GlobalSettings

Module Contents#

logger#
class Settings(/, **data: Any)#

Bases: aiq.data_models.common.HashableBaseModel

Subclass of a Pydantic BaseModel that is hashable. Use in objects that need to be hashed for caching purposes.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

channels: dict[str, aiq.data_models.registry_handler.RegistryHandlerBaseConfig]#
_configuration_directory: ClassVar[str]#
_settings_changed_hooks: ClassVar[list[collections.abc.Callable[[], None]]] = []#
_settings_changed_hooks_active: bool = True#
classmethod validate_components(
value: Any,
handler: pydantic.ValidatorFunctionWrapHandler,
info: pydantic.ValidationInfo,
)#
classmethod rebuild_annotations()#
property channel_names: list#
property configuration_directory: str#
property configuration_file: str#
static from_file()#
set_configuration_directory(
directory: str,
remove: bool = False,
) None#
reset_configuration_directory(remove: bool = False) None#
_save_settings() None#
update_settings(config_obj: dict | Settings)#
_update_settings(config_obj: dict | Settings)#
_revalidate(config_dict) bool#
print_channel_settings(channel_type: str | None = None) None#
override_settings(config_file: str) Settings#
_settings_changed()#
pause_settings_changed_hooks()#
add_settings_changed_hook(
cb: collections.abc.Callable[[], None],
) None#
class GlobalSettings#
_global_settings: Settings | None = None#
static get() Settings#
static push()#