The pecan.configuration module provides an implementation of a Python-based configuration engine for Pecan applications.
Bases: object
Base class for Pecan configurations.
Create a Pecan configuration object from a dictionary or a filename.
Parameters: |
|
---|
Converts recursively the Config object into a valid dictionary.
Parameters: | prefix – A string to optionally prefix all key elements in the returned dictonary. |
---|
Updates this configuration with a dictionary.
Parameters: | conf_dict – A python dictionary to update this configuration with. |
---|
Creates a configuration dictionary from a dictionary.
Parameters: | conf_dict – The configuration dictionary. |
---|
Creates a configuration dictionary from a file.
Parameters: | filepath – The path to the file. |
---|
If the PECAN_CONFIG environment variable exists and it points to a valid path it will return that, otherwise it will raise a RuntimeError.
Initializes the default configuration and exposes it at pecan.configuration.conf, which is also exposed at pecan.conf.
Updates the global configuration.
Parameters: | config – Can be a dictionary containing configuration, or a string which represents a (relative) configuration filename. |
---|