如何用两个py文件打开api explorer绑定?

2024-04-27 17:19:17 发布

您现在位置:Python中文网/ 问答频道 /正文

这是我的附录yaml你知道吗

    # Endpoints handler
- url: /customer/.*
  script: DimCustomerManagement.APPLICATION

- url: /user.*
  script: DimUserManagement.APPLICATION

如何打开api资源管理器来检查api是否在本地工作?你知道吗


Tags: apiurlyamlapplicationscriptcustomerhandler资源管理
2条回答

对这个探险家来说也是一样的。但会有两种服务

创建一个单独的文件'服务.py'

import endpoints
from DimCustomerManagement import name_of_endpoint_classs1
from DimUserManagement import name_of_endpoint_classs2

application = endpoints.api_server([name_of_endpoint_classs1,name_of_endpoint_classs2])

改变附录yaml你知道吗

# Endpoints handler

- url: /.*
  script: TechHealServices.application

尝试:

https://apis-explorer.appspot.com/apis-explorer/?base=https://appname.appspot.com/_ah/api

如果您想在localhost上测试它,只需将URL改为

https://apis-explorer.appspot.com/apis-explorer/?base=http://localhost:8080/_ah/api

相关问题 更多 >