@classmethod
    def range(cls, field, from_value=None, to_value=None, include_lower=None, include_upper=None):

        instance = cls({'range': {field: {}}})
        if from_value is not None:
            instance['range'][field]['from'] = from_value
        if to_value is not None:
            instance['range'][field]['to'] = to_value
        if include_lower is not None:
            instance['range'][field]['include_lower'] = include_lower
        if include_upper is not None:
            instance['range'][field]['include_upper'] = include_upper

        return instance
http://www.elasticsearch.org/guide/reference/query-dsl/range-filter.html
dataset/ETHPy150Open ooici/elasticpy/elasticpy/filter.py/ElasticFilter.range