title: How can I filter by key, or keys, a query in Python for Google App Engine?
body: <p>I have a <code>query</code> and I can apply <a href="http://code.google.com/appengine/docs/python/datastore/queryclass.html#Query_filter" rel="nofollow"><code>filters</code></a> on them without any problem. This works fine:</p>
  
  <pre><code>query.filter('foo =', 'bar')
  </code></pre>
  
  <p>But what if I want to filter my query by <code>key</code> or a list of keys? </p>
  
  <p>I have them as <code>Key()</code> property or as a <code>string</code> and by trying something like this, it didn't work:</p>
  
  <pre><code>query.filter('key =', 'some_key')        #no success
  query.filter('key IN', ['key1', 'key2']) #no success
  </code></pre>