Google Cloud Datastore: All content tagged as Google Cloud Datastore in NoSQL databases and polyglot persistence
def WriteEntity(): req = datastore.BlindWriteRequest() entity = req.mutation.upsert.add() path = entity.key.path_element.add() path.kind = 'Greeting' path.name = 'foo' message = entity.property.add() message.name = 'message' value = message.value.add() value.string_value = 'to the cloud and beyond!' try: datastore.blind_write(req) except datastore.RPCError as e: # remember to do something useful with the exception pass
I haven’t seen in a while such a terrible API. Makes me wonder what was wrong with the Google AppEngine API; this one is more verbose than even XML.
Original title and link: A sample of Google Cloud Datastore Python API ( ©myNoSQL)