我想要一些功能上相当于应用程序引擎ndb中的string->string
键值存储的东西,类似于Couchbase。我不想模仿任何东西。我有什么选择?
最佳答案
类似这样的吗?
class KVStore(ndb.Model):
v = ndb.TextProperty()
@classmethod
def get(cls, k):
e = cls.get_by_id(k)
return e.v if e else None
@classmethod
def set(cls, k, v):
e = cls(id=k, v=v)
e.put()
关于python - 使用 Google App Engine 作为简单的键/值存储,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27365390/