如何使用 googledatastore 包设置 "keys_only"

How to set "keys_only" using googledatastore package

我想使用 GoogleCloudDataFlow 上的 googledatastore 包从数据存储中读取数据。

但是,我无法在 googledatastore 文档中找到 "keys_only" 查询。 http://googledatastore.readthedocs.io/en/latest/googledatastore.html

如何在 googledatastore 上设置 "keys_only"?

使用投影查询

  from googledatastore import helper
  helper.add_projection(
    query,
    '__key__')