def parse_request(filters=None, defaults=None):
    'Parse arguments in request according to the _TRANSFORMATIONS or given\n    filters.\n    Requests containing other keys are considered invalid.\n\n    :param dict filters: dict of filter templates containing for each key\n        (column, operator, function transforming value from request argument)\n    :param dict defaults: default values of modifiers\n    :return dict: dict of parsed arguments\n    :raises werkzeug.exceptions.BadRequest: if one of the request arguments is\n        not recognized\n    '
    if (filters is None):
        filters = {}
    if (defaults is not None):
        args_dict = defaults.copy()
    else:
        args_dict = {}
    filters_list = []
    for (key, value) in request.args.items():
        if (key in _TRANSFORMATIONS):
            try:
                args_dict[key] = _TRANSFORMATIONS[key](value)
            except ValueError:
                raise BadRequest(('Argument has invalid value "%s".' % value))
        elif (key in filters.keys()):
            filters_list.append(filters[key][1](filters[key][0], filters[key][2](value)))
        else:
            raise BadRequest(('Argument "%s" not recognized.' % key))
    if ('filter' not in args_dict.keys()):
        args_dict['filter'] = []
    args_dict['filter'] += filters_list
    return args_dict
Parse arguments in request according to the _TRANSFORMATIONS or given
filters.
Requests containing other keys are considered invalid.

:param dict filters: dict of filter templates containing for each key
    (column, operator, function transforming value from request argument)
:param dict defaults: default values of modifiers
:return dict: dict of parsed arguments
:raises werkzeug.exceptions.BadRequest: if one of the request arguments is
    not recognized
def parse_request(filters=None, defaults=None):
    'Parse arguments in request according to the _TRANSFORMATIONS or given\n    filters.\n    Requests containing other keys are considered invalid.\n\n    :param dict filters: dict of filter templates containing for each key\n        (column, operator, function transforming value from request argument)\n    :param dict defaults: default values of modifiers\n    :return dict: dict of parsed arguments\n    :raises werkzeug.exceptions.BadRequest: if one of the request arguments is\n        not recognized\n    '
    if (filters is None):
        filters = {}
    if (defaults is not None):
        args_dict = defaults.copy()
    else:
        args_dict = {}
    filters_list = []
    for (key, value) in request.args.items():
        if (key in _TRANSFORMATIONS):
            try:
                args_dict[key] = _TRANSFORMATIONS[key](value)
            except ValueError:
                raise BadRequest(('Argument has invalid value "%s".' % value))
        elif (key in filters.keys()):
            filters_list.append(filters[key][1](filters[key][0], filters[key][2](value)))
        else:
            raise BadRequest(('Argument "%s" not recognized.' % key))
    if ('filter' not in args_dict.keys()):
        args_dict['filter'] = []
    args_dict['filter'] += filters_list
    return args_dict