将 appengine 1 的数据存储用于 appengine 2
Using datastore of appengine 1 for appengine 2
由于 Python 2 结束并且不再支持 App Engine 1,我们正在迁移到 App Engine 2。我有一个相当大的数据存储。鉴于两个 App Engine 需要在两个不同的项目上,是否可以连接到旧 App Engine 的数据存储作为新 App Engine 的数据存储?理想情况下使用 NDB。
GAE/GCP 项目的数据存储可以从另一个项目中的应用程序访问,甚至可以从 Google 云外部访问,参见 How do I use Google datastore for my web app which is NOT hosted in google app engine?。
我还没有玩 python 3 ndb library (aka Cloud NDB), I can't exactly say if/how it can use another project's credentials. I'm unsure if you want to try to use it, though: from Migrating to Cloud NDB:
Cloud NDB is intended to replace the features in App Engine NDB, so it
will not support new features of Firestore in Datastore mode. New
Python 3 apps should use the Datastore mode client library
instead of Cloud NDB.
在最坏的情况下,Datastore 模式客户端库(实际上是 python 3 个 GAE 应用的推荐客户端库)应该 能够访问您的 python 2 应用程序的数据存储——它是通用的,它可以用于任何应用程序,而不仅仅是 GAE。根据文档其 Client()
method supports specifying a project and credentials (where you'd be using the service account for the python 2 app's project). Potentially of interest:
由于 Python 2 结束并且不再支持 App Engine 1,我们正在迁移到 App Engine 2。我有一个相当大的数据存储。鉴于两个 App Engine 需要在两个不同的项目上,是否可以连接到旧 App Engine 的数据存储作为新 App Engine 的数据存储?理想情况下使用 NDB。
GAE/GCP 项目的数据存储可以从另一个项目中的应用程序访问,甚至可以从 Google 云外部访问,参见 How do I use Google datastore for my web app which is NOT hosted in google app engine?。
我还没有玩 python 3 ndb library (aka Cloud NDB), I can't exactly say if/how it can use another project's credentials. I'm unsure if you want to try to use it, though: from Migrating to Cloud NDB:
Cloud NDB is intended to replace the features in App Engine NDB, so it will not support new features of Firestore in Datastore mode. New Python 3 apps should use the Datastore mode client library instead of Cloud NDB.
在最坏的情况下,Datastore 模式客户端库(实际上是 python 3 个 GAE 应用的推荐客户端库)应该 能够访问您的 python 2 应用程序的数据存储——它是通用的,它可以用于任何应用程序,而不仅仅是 GAE。根据文档其 Client()
method supports specifying a project and credentials (where you'd be using the service account for the python 2 app's project). Potentially of interest: