def get():
config = {}<EOL>try:<EOL><INDENT>config = _load_config()<EOL><DEDENT>except IOError:<EOL><INDENT>try:<EOL><INDENT>_create_default_config()<EOL>config = _load_config()<EOL><DEDENT>except IOError as e:<EOL><INDENT>raise ConfigError(_FILE_CREATION_ERROR.format(e.args[<NUM_LIT:0>]))<EOL><DEDENT><DEDENT>except SyntaxError as e:<EOL><INDENT>raise ConfigError(_JSON_SYNTAX_ERROR.format(e.args[<NUM_LIT:0>]))<EOL><DEDENT>except Exception:<EOL><INDENT>raise ConfigError(_JSON_SYNTAX_ERROR.format('<STR_LIT>'))<EOL><DEDENT>try:<EOL><INDENT>_validate(config)<EOL><DEDENT>except KeyError as e:<EOL><INDENT>raise ConfigError(_MANDATORY_KEY_ERROR.format(e.args[<NUM_LIT:0>]))<EOL><DEDENT>except SyntaxError as e:<EOL><INDENT>raise ConfigError(_INVALID_KEY_ERROR.format(e.args[<NUM_LIT:0>]))<EOL><DEDENT>except ValueError as e:<EOL><INDENT>raise ConfigError(_INVALID_VALUE_ERROR.format(e.args[<NUM_LIT:0>]))<EOL><DEDENT>config['<STR_LIT>'] = os.path.expanduser(config['<STR_LIT>'])<EOL>_complete_config(config)<EOL>return config<EOL>
Only API function for the config module.

    :return: {dict}     loaded validated configuration.