:py:mod:`config_client` ======================= .. py:module:: config_client .. autoapi-nested-parse:: Client to load and process YAML configuration files. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: config_client.ConfigClient .. py:class:: ConfigClient(config_file_name='resources/app.yaml') Client to load and process YAML configuration files. .. py:property:: logger_properties :type: dict Get the logger properties from the configuration. .. py:attribute:: env_var_pattern .. py:attribute:: env_var_with_default_pattern .. py:attribute:: logger .. py:method:: __get_other_static_config_files() Load additional static configuration files specified in the application config. .. py:method:: __load_static_config_files() Load additional static configuration files specified in the application config. .. py:method:: get(key, default_value=None) Get a value from the configuration by key. :param key: The key to look up in the configuration. :param default_value: The default value to return if the key is not found. :return: The value associated with the key, or the default value if the key is not found. .. py:method:: get_config_path(config_file_name) Get the absolute path of the configuration file. :param config_file_name: :return: Absolute path of the configuration file. .. py:method:: get_dict(key, default_value = None) Get a dictionary value from the configuration by key. :param key: The key to look up in the configuration. :param default_value: The default value to return if the key is not found or if the value is not a dict. :return: The dictionary value associated with the key, or the default value if the key is not found or not a dict. .. py:method:: get_list(key, default_value = None) Get a list value from the configuration by key. :param key: The key to look up in the configuration. :param default_value: The default value to return if the key is not found or if the value is not a list. :return: The list value associated with the key, or the default value if the key is not found or not a list. .. py:method:: get_string(key, default_value = None) Get a string value from the configuration by key. :param key: The key to look up in the configuration. :param default_value: The default value to return if the key is not found or if the value is not a string. :return: The string value associated with the key, or the default value if the key is not found or not a string. .. py:method:: load(key, cls, default_value=None) Load a configuration value and return an instance of the specified class. :param key: The key to look up in the configuration. :param cls: The class to instantiate with the configuration values. :param default_value: The default value to return if the key is not found or if instantiation fails. :return: An instance of the specified class initialized. .. py:method:: load_and_process_yaml(file_path) Load a YAML file and process its content to resolve environment variable placeholders. :param file_path: Path to the YAML file. :return: Processed YAML content as a Python object. .. py:method:: process_object(obj) Recursively process a Python object (list or dict) to resolve environment variable placeholders. :param obj: The Python object to process. :return: The processed object with placeholders resolved. .. py:method:: resolve_placeholders(value) Resolve environment variable placeholders in a string. :param value: The string containing placeholders. :return: The string with placeholders resolved, or the original value if not a string.