def filter_by self kwargs apply the given filtering criterion to the q

1
2
3
4
5
6
7
def filter_by(self, **kwargs):
"""apply the given filtering criterion to the query and return the newly resulting ``Query``."""
clauses = [_entity_descriptor(self._joinpoint_zero(), key)[0] == value
for key, value in kwargs.iteritems()]
return self.filter(sql.and_(*clauses))