google.appengine.ext.ndb 和 gcloud.datastore 有什么区别? [英] what's the difference between google.appengine.ext.ndb and gcloud.datastore?

查看:35
本文介绍了google.appengine.ext.ndb 和 gcloud.datastore 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ndb:(来自 google.appengine.ext 导入 ndb)

ndb: (from google.appengine.ext import ndb)

数据存储:(来自 gcloud 导入数据存储)

datastore: (from gcloud import datastore)

有什么区别?我已经看到他们都使用过,并暗示他们都将数据保存到谷歌数据存储.为什么有两种不同的实现方式?

What's the difference? I've seen both of them used, and hints they both save data to google datastore. Why are there two different implementations?

推荐答案

Python NDB 客户端特定于在 Google App Engine 上运行的 Python 应用程序.数据存储客户端消除了该限制,您可以在任何地方运行您的 Python 应用程序,包括 Google App Engine、Google Compute Engine 或其他任何地方.

The Python NDB Client is specific to Python Applications running on Google App Engine. The datastore client removes that restriction and you can run your Python application anywhere, including Google App Engine, Google Compute Engine or anywhere else.

Exceprt 表单 - https://cloud.google.com/appengine/docs/python/ndb/

Exceprt form - https://cloud.google.com/appengine/docs/python/ndb/

Google 数据存储区 NDB 客户端库允许 App Engine Python用于连接到 Cloud Datastore 的应用.

The Google Datastore NDB Client Library allows App Engine Python apps to connect to Cloud Datastore.

此外,NDB 客户端具有某些功能(例如缓存),而另一个不支持.

In addition, the NDB client has certain features (e.g. caching) while the other does not appeat to support.

这篇关于google.appengine.ext.ndb 和 gcloud.datastore 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆