0

我有一个Endpoints模型来自终端Proto Datastore API,名为Resource,我正在使用Resource.query()。fetch(10)来请求10个项目。Google Cloud Endpoints Multi获取

问题是它返回的是一个资源数组,但根据“Creating a Endpoints API”的文档,我需要返回一组消息。

https://cloud.google.com/appengine/docs/python/endpoints/create_api

Proto RPC messages with Google Cloud Enpoints

有没有我的模型数组转换为消息的标准方式,或者是for循环的最有效的方式去了解呢?

在此先感谢!

回答

相关问题