Source code for social.utils.configuration

# -*- coding: utf-8 -*-
"""
==========================================================================
social.utils.configuration method retrieve configuration value from a json
==========================================================================
"""
CONFIG = None
from json import load

with open("".join(["./", "configuration.json"])) as json_configuration_file:
    CONFIG = load(json_configuration_file)


[docs]def configuration(configuration_folder="./", configuration_file="configuration.json"): """ Retrieve configuration value from a json configuration file as python dictionary :param configuration_file: Kwarg, default is configuration.son :param configuration_folder: Kwarg, default is the current working :return: A python dictionary equivalent of the configuration configuration file """ with open("".join([configuration_folder, configuration_file])) as json_configuration_file: return load(json_configuration_file)