SettingsManager
Bases: SettingsBuilder, SettingsRoot
__init__
Initialize the settings manager.
Args: content_root_path: An optional path to be used as the root for resolving relative paths in settings sources. If not provided, the current working directory will be used as the content root path. add_default_providers: Whether to add the default settings providers.
add_aws_secrets_manager
add_aws_secrets_manager(
secret_id: str,
region: str | None = None,
url: str | None = None,
) -> Self
Add a settings provider that reads settings values from AWS Secrets Manager.
add_azure_key_vault
Add a settings provider that reads settings values from Azure Key Vault.
add_environment_variables
Add a settings provider that reads settings values from environment variables.
add_json_file
Add a settings provider that reads settings values from a JSON file.
get_model
Get a settings model of the specified type. The settings values will be mapped to the model fields by their names.
get_required_value
Get a setting value by its key or raise an error if the key is not found or the value is None. Optionally, validate the setting value against the specified type.