Consensus.config_utils module
Load the config.json
The main purpose of this module is to load the configuration from a file within the package. This is a simple implementation that assumes the configuration file is named ‘config.json’ and is located in a directory named ‘config’ within the package. The configuration is loaded as a dictionary and returned.
This module uses the importlib.resources
module to access the configuration file within
the package’s resources. If the file is not found, an empty dictionary is returned.
Note that this implementation does not handle any potential exceptions that may occur during
the loading or parsing of the configuration file.
- Consensus.config_utils.load_config()
Load configuration from a file within the package.
- Returns:
A dictionary containing the configuration settings.
- Return type:
Dict[str, Any]