title: dynamic query filter with SQLalchemy operators
body: <p>I have a list : <code>scope_list = ['prd1 rls1', ' prd1 rls1 rls3 rls2']</code></p>
  
  <p>I would like to create a filter based on <code>scope_list</code> that in SQL would look like : </p>
  
  <pre><code>(product=prd1 AND `release` in (rls1)) OR (product=prd1 AND release in (rls1 ,rls3, rls2))
  </code></pre>
  
  <p>Knowing that the number of values in <code>scope_list</code> varies and that I can't previously know it. This is why I would like to manage the filter dynamically from <code>scope_list</code>.</p>
  
  <p>In SQL Alchemy I guess I should do something like this : </p>
  
  <pre><code>session.query(my_table).filter(or_(and_(my_table.product==%s,mytable.release.in_(%s))) for element.split() in scope_list)
  </code></pre>
  
  <p>I'm just starting to learn SQL Alchemy, any help would be much appreciated.</p>