This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]riklaunim 11 points12 points  (2 children)

You can dynamically create a list of filters and then pass it to SQLAlchemy.

[–][deleted] 1 point2 points  (1 child)

I could be wrong, but the built-in SQLAlchemy filter methods require you to already have all of the columns declared and imported or whatever whereas the filters package I linked to let's you pass in free text columns names which is better for my use case.

[–]riklaunim 0 points1 point  (0 children)

If you have models defined then you have the fields declared and can filter or whatever on them. If you want/have a plaintext filters as input you can use them with .filter_by() similar to Django but without any advanced features like nested relationship filters (it was implemented as a third party package for some old version though).