python-3.x - 从 protoRPC 迁移(Python 2.7 到 Python 3)Google App 引擎
问题描述
我们有一个谷歌应用引擎 py2.7 标准。我们使用云端点框架来制作 web api。我们还使用 protopc 来进行数据的序列化和反序列化。
例如
@cloud_endpointapi.api_class(resource_name="validateteacherpin")
class ValidateTeacherPin(remote.Service):
MULTIPLY_METHOD_RESOURCE = endpoints.ResourceContainer(API_Validate_Teacher_Pin_Request)
@endpoints.method(MULTIPLY_METHOD_RESOURCE,
API_Validate_Teacher_Pin_Response,
http_method='POST',
name='teacher.validateteacherpinentered')
from protorpc import messages
from protorpc import message_types
from protorpc import remote
class API_Validate_Teacher_Pin_Request(messages.Message):
field_1 = messages.StringField(1)
field_2 = messages.StringField(2)
我们现在正在将应用程序迁移到 Google App 引擎标准中的 Python 3.7。Python 3.7 不支持 protopc。我们如何迁移代码?
解决方案
推荐阅读
- javascript - 如何使用 Node.js 模块?
- asp.net-core - 当服务抛出异常时,未调用 ExceptionFilterAttribute.OnException
- android - 带有 MVVM 架构组件的 StartActivityForResult
- jquery - 如何从“div”元素中删除“锚”元素?
- reactjs - React + Redux + normalizr api 请求错误处理
- android - 调用 UPDATE api retrofit2 的问题
- mongodb - 条件求和mongodb聚合
- sql - 选择 column1、column2、column3 和 column4 的行!= 1
- c++ - mathGl / MinGW 未定义参考 Netbeans IDE
- javascript - Javascript 循环下拉列表选项