I know you can build dynamic filters for queries for SQLAlchemy by supplying **kwargs to filter_by.
For example
filt
Instead of using filter_by I would recommend using filter, it gives you a lot more options.
For example (from the manual):
db.session.query(MyClass).filter(
MyClass.name == 'some name',
MyClass.id > 5,
)
In relation to your case:
filters = (
Transaction.amount > 10,
Transaction.amount < 100,
)
db.session.query(Transaction).filter(*filters)