Check out example codes for "sqlalchemy filter getattr". It will help you in understanding the concepts better.

Code Example 1

q = session.query(myClass)
for attr, value in web_dict.items():
    q = q.filter(getattr(myClass, attr).like("%%%s%%" % value))

Learn ReactJs, React Native from akashmittal.com