(case_property_name, gt=None, gte=None, lt=None, lte=None)
return _base_property_query(
        case_property_name,
        queries.date_range("{}.{}.date".format(CASE_PROPERTIES_PATH, VALUE), **kwargs)
    )
Returns cases where case property `key` fall into the range provided.
Returns cases where case property `key` fall into the range provided.
Returns cases where case property key fall into the range provided .
def case_property_range_query(case_property_name, gt=None, gte=None, lt=None, lte=None):
    """Returns cases where case property `key` fall into the range provided.

    """
    kwargs = {'gt': gt, 'gte': gte, 'lt': lt, 'lte': lte}
    # if its a number, use it
    try:
        # numeric range
        kwargs = {key: float(value) for key, value in kwargs.items() if value is not None}
        return _base_property_query(
            case_property_name,
            queries.range_query("{}.{}.numeric".format(CASE_PROPERTIES_PATH, VALUE), **kwargs)
        )
    except ValueError:
        pass

    # if its a date, use it
    # date range
    kwargs = {
        key: parse_date(value) for key, value in kwargs.items()
        if value is not None and parse_date(value) is not None
    }
    if not kwargs:
        raise TypeError()       # Neither a date nor number was passed in

    return _base_property_query(
        case_property_name,
        queries.date_range("{}.{}.date".format(CASE_PROPERTIES_PATH, VALUE), **kwargs)
    )
def case_property_range_query ( case_property_name , gt = None , gte = None , lt = None , lte = None ) : kwargs = { 'gt' : gt , 'gte' : gte , 'lt' : lt , 'lte' : lte } # if its a number, use it try : # numeric range kwargs = { key : float ( value ) for key , value in kwargs . items ( ) if value is not None } return _base_property_query ( case_property_name , queries . range_query ( "{}.{}.numeric" . format ( CASE_PROPERTIES_PATH , VALUE ) , * * kwargs ) ) except ValueError : pass # if its a date, use it # date range kwargs = { key : parse_date ( value ) for key , value in kwargs . items ( ) if value is not None and parse_date ( value ) is not None } if not kwargs : raise TypeError ( ) # Neither a date nor number was passed in return _base_property_query ( case_property_name , queries . date_range ( "{}.{}.date" . format ( CASE_PROPERTIES_PATH , VALUE ) , * * kwargs ) )