jsonconfigreader methods

jsonconfigreader.json_config_reader module

class jsonconfigreader.json_config_reader.JsonConfigReader(config_path)

Bases: object

get()

Class method that returns parsed config content in dict format.

Returns:
dict: Configuration file content
get_config_file_path()

Class method that returns full config file path.

Returns:
srt: full config file path
get_value_by_property_address(property_address, dictionary)

Class method that returns value from the dict based on the address string.

Args:
property_address (str): Address of the property in the config. Example: ‘dataBase.connection’ dictionary (dict): Configuration
Returns:
Could be bool, dict, srt, number, list etc.
is_default_value(string_value)

Class method that figures out whether string is custom default variable in config.

Args:
string_value (str): Specificly formatted string. Example: ‘<defaults.dataBase>’
Returns:
bool: True if it is default variable, False otherwise
read_json_file(file_path)

Class method reads the data from json file and returs dictionary.

Returns:
dict: Config file content.
Raises:
IOError: If methods fails reading data from file exaption will be risen