Skip to content

Instantly share code, notes, and snippets.

@diffused
Created May 4, 2013 12:24
Show Gist options
  • Save diffused/5517341 to your computer and use it in GitHub Desktop.
Save diffused/5517341 to your computer and use it in GitHub Desktop.
Python peewee orm. How to do a "where in (1,2,3)" style query. It was kind of tricky to find the syntax in the docs/google
products = Product.select().where(
Product.id << [161,162,163,164,165]).where(
~(Product.brand_name >> None)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment