如何在 appengine 之外使用 ndb?

How can I use ndb outside of appengine?

我非常喜欢 GAE 的对象关系数据库工具 db 和 ndb。我目前正准备开发一个需要从 Google 的云环境之外的本地计算机托管的服务器。也就是说,我打算使用 python flask 服务器。

我使用过 SQLAlchemy 等其他工具与数据库交互,但我更喜欢使用 ndb。一些关于在 GAE 之外使用 ndb 的搜索表明 google 云支持,但这也不是一个选项。

甚至可以在 Appengine 环境之外使用 ndb 吗?有没有做过的例子?

目前这可以使用 Remote API. Note that the process for setting up Remote API is a little complicated and using it has some limitations

This article 介绍了如何为 db 设置它的步骤,但是对于 ndb 的过程是相同的。