Configuration
Configuration: built-in defaults deep-merged with a user TOML file.
api_key(section)
¶
Read the API key named by a section's api_key_env.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
section
|
dict[str, Any]
|
A config section such as |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
The key, or None if no variable is configured or set. |
Source code in src/murmurvault/config.py
161 162 163 164 165 166 167 168 169 170 171 | |
config_path()
¶
Locate the user config file.
Returns:
| Type | Description |
|---|---|
Path
|
|
Source code in src/murmurvault/config.py
119 120 121 122 123 124 125 126 | |
load(path=None)
¶
Load the effective configuration: built-in defaults deep-merged with the user file.
$MURMURVAULT_VAULT overrides the vault location.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path | None
|
Config file to read; defaults to :func: |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
The configuration. |
Source code in src/murmurvault/config.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | |