Config Manager
Provide settings modules.
ConfigManager
Provide config management representation.
defaults
property
readonly
Get configuration defaults.
filepaths: Tuple[str, ...]
property
readonly
Retrieve filepaths.
settings: SettingsMap
property
readonly
Create settings to prototype idea.
__getattr__(self, attr)
special
Proxy calls to settings store.
Source code in compendium/config_manager.py
72 73 74 75 76 77 78 79 80 81 82 83 |
|
__init__(self, name, *args, **kwargs)
special
Initialize single settings management.
merge_sections: [] merge_strategy: - overlay - partition - last
Source code in compendium/config_manager.py
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 69 |
|
__repr__(self)
special
Get string representation of data.
Source code in compendium/config_manager.py
85 86 87 |
|
add_filepath(self, filepath)
Load settings from configuration in filepath.
Source code in compendium/config_manager.py
109 110 111 112 |
|
load_config(self, filepath, update=True)
Load settings from configuration.
Source code in compendium/config_manager.py
122 123 124 125 126 127 128 129 130 131 132 |
|
load_configs(self)
Load configuration files from filepaths.
Source code in compendium/config_manager.py
134 135 136 137 |
|
HierarchyConfigManager
Manage settings from hierarchy config_files.
__init__(self, name, *args, **kwargs)
special
Initialize settings from hirarchy filepaths.
Parameters
str
Name of name.
list, optional
Include sections to be merged
list, optional
Strategy to used when merging: overlay, parition, and last - overlay will replace exsisting entries - partition will keeps each seettings separate - last will only use the last loaded
bool, optional
Enable system filepath lookup for config_files.
bool, optional
Enable user filepath lookup for config_files.
bool, optional
Enable local filepath lookup for config_files.
Source code in compendium/config_manager.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
|
TreeConfigManager
Manage settings from nested tree config_files.
namepaths: Tuple[str, ...]
property
readonly
Return list of namepaths.
__init__(self, name, *args, **kwargs)
special
Initialize nested settings management.
Source code in compendium/config_manager.py
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
|
get_config(self, namepath)
Get config from store by attribute.
Source code in compendium/config_manager.py
255 256 257 258 259 |
|
get_filepath(self, name)
Get filepath from namepath.
Source code in compendium/config_manager.py
248 249 250 251 252 253 |
|
get_name(self, filepath)
Get name from tree path.
Source code in compendium/config_manager.py
228 229 230 231 232 233 234 235 236 |
|
get_namepath(self, filepath)
Get name from tree path.
Source code in compendium/config_manager.py
238 239 240 241 242 243 244 245 246 |
|
load_config(self, filepath, update=False, *args, **kwargs)
Load config.
Source code in compendium/config_manager.py
303 304 305 306 307 308 309 310 |
|
load_configs(self)
Load configuration files from filepaths.
Source code in compendium/config_manager.py
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
|
new_child(self, name, *args, **kwargs)
Get child config node.
Source code in compendium/config_manager.py
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
|