Factory for creating Settings instances with different credential sources.
SettingsFactory
config.settings_factory.SettingsFactory()
Factory for creating Settings instances with different credential sources.
This factory provides methods to create Settings instances from different credential sources, including environment variables, credential files, and secure credential stores.
Create settings using credentials from environment variables and provided username/password.
This method is designed to be used when environment credentials have already been set up, typically by CredentialManager.ensure_credentials_in_environment().
Parameters
Name
Type
Description
Default
project_root
Optional[Path]
Project root path
None
sql_dir
Optional[Path]
SQL directory path
None
cache_dir
Optional[Path]
Cache directory path
None
output_dir
Optional[Path]
Output directory path
None
data_dir
Optional[Path]
Data directory path
None
batch_size
int
Batch size for processing, by default 10000
10000
username
Optional[str]
Database username, overrides environment variable
None
password
Optional[str]
Database password, overrides environment variable
None
Returns
Name
Type
Description
Settings
Settings instance with credentials from environment variables and provided credentials
Load global settings from YAML and set as environment variables.
This method loads the global settings file and sets database configuration values as environment variables for use with other methods that rely on environment variables.
Parameters
Name
Type
Description
Default
custom_path
Optional[Path]
Custom path to the global settings file. If None, the default location (~/.nova_fde/settings.yaml) is used.