def required_params(data, *r_params):
    """Check if given parameters are in the given dict, if not raise an
    exception.

    :param data: data to check
    :type data: dict
    :param r_params: required parameters
    :raises RequestException: if params not in data
    """

    if not reduce(lambda still_valid, param: still_valid and param in data,
                  r_params, True):
        raise RequestException(msg_err_missing_params(*r_params))
def required_params ( data , * r_params ) : if not reduce ( lambda still_valid , param : still_valid and param in data , r_params , True ) : raise RequestException ( msg_err_missing_params ( * r_params ) )
Check if given parameters are in the given dict, if not raise an
    exception.

    :param data: data to check
    :type data: dict
    :param r_params: required parameters
    :raises RequestException: if params not in data