def float_from_request(params, key, default):
    """ Get float from request GET, POST, etc

    :param params: dict POST, GET, etc
    :param key: key to find
    :param default: default value
    :return: float
    """
    value = params.get(key, default)

    # str
    if isinstance(value, str):
        try:
            return float(value)
        except ValueError:
            raise ValueError(f'Incorrect value in key "{key}" = "{value}". It should be digit string.')
    # float
    elif isinstance(value, float) or isinstance(value, int):
        return float(value)
    # other
    else:
        raise ValueError(f'Incorrect value type in key "{key}" = "{value}". It should be digit string or float.')