1qry = DBSession.query(User).filter(User.birthday.between('1985-01-17', '1988-01-17'))
2#or
3qry = DBSession.query(User).filter(
4 and_(User.birthday <= '1988-01-17', User.birthday >= '1985-01-17'))
5# or same:
6qry = DBSession.query(User).filter(User.birthday <= '1988-01-17').\
7 filter(User.birthday >= '1985-01-17')
8