papi.core.settings
¶
get_config(config_file_path=None)
¶
Load and cache the application configuration from a YAML file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config_file_path
|
Optional[str]
|
Path to the configuration file. If not provided, uses cached path or defaults to 'config.yaml'. |
None
|
Returns:
Name | Type | Description |
---|---|---|
AppConfig |
AppConfig
|
The loaded configuration object. |
Raises:
Type | Description |
---|---|
FileNotFoundError
|
If the specified config file does not exist. |
YAMLError
|
If the file cannot be parsed as valid YAML. |
Exception
|
If the data cannot be converted into an AppConfig. |
Source code in papi/core/settings.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
|