Index
Used to store the application configuration.
The config package provides functionality for managing and configuring various aspects
of the Merlin application, including broker settings, results backends, Celery configurations,
and application-level settings. It serves as the central hub for loading, processing, and
utilizing configuration data defined in the app.yaml file and other related resources.
Modules:
| Name | Description |
|---|---|
broker.py |
Manages broker configurations and connection strings for messaging systems. |
celeryconfig.py |
Contains default Celery configuration settings for Merlin. |
configfile.py |
Handles the loading and processing of application configuration files and SSL-related settings. |
results_backend.py |
Configures connection strings and SSL settings for results backends. |
utils.py |
Provides utilities for broker priority handling and validation. |
Config
The Config class, meant to store all Merlin config settings in one place. Regardless of the config data loading method, this class is meant to standardize config data retrieval throughout all parts of Merlin.
Attributes:
| Name | Type | Description |
|---|---|---|
celery |
Optional[SimpleNamespace]
|
A namespace containing Celery configuration settings. |
broker |
Optional[SimpleNamespace]
|
A namespace containing broker configuration settings. |
results_backend |
Optional[SimpleNamespace]
|
A namespace containing results backend configuration settings. |
Methods:
| Name | Description |
|---|---|
__copy__ |
Creates a shallow copy of the Config instance. |
__str__ |
Returns a formatted string representation of the Config instance. |
load_app_into_namespaces |
Converts the provided configuration dictionary into namespaces and assigns them to the Config instance's attributes. |
Source code in merlin/config/__init__.py
__copy__()
Creates a shallow copy of the Config instance.
Returns:
| Type | Description |
|---|---|
Config
|
A new Config instance with copied |
Source code in merlin/config/__init__.py
__init__(app_dict)
Initializes the Config instance with configuration data from a dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app_dict
|
Dict
|
A dictionary containing configuration data for the application.
The dictionary may include keys such as "celery", "broker", and "results_backend",
each of which is converted into a |
required |
Source code in merlin/config/__init__.py
__str__()
Returns a formatted string representation of the Config instance.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
A string containing the values of the |
Source code in merlin/config/__init__.py
load_app_into_namespaces(app_dict)
Converts the provided application dictionary into namespaces and assigns them to the Config instance's attributes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app_dict
|
Dict
|
A dictionary containing configuration data for the application. |
required |