Filtering by entity key name in Google App Engine on Python

一笑奈何 提交于 2019-11-30 03:37:29
from google.appengine.api.datastore import Key
query.filter("__key__ >=", Key.from_path('User', 'abc'))

For me a similar way worked, while the "from_path" function did not worked in my case, this one did:

from google.appengine.api.datastore import Key

key = Key(your_string_with_key)
query.filter("__key__ = ", key)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!