后端API Python

后端API Python,python,google-app-engine,backend,Python,Google App Engine,Backend,在实现后端API以使用后端服务时,我完成了如下代码: 时区_service.py: class TaskQueueTimeZoneHandler(webapp2.RequestHandler): def get(self): outdict=self.request.params logging.info("Enter In taskqueue") taskqueue.add(url='/api/timezone/setTi

在实现后端API以使用后端服务时,我完成了如下代码:

时区_service.py:

class TaskQueueTimeZoneHandler(webapp2.RequestHandler):
    def get(self):
        outdict=self.request.params
        logging.info("Enter In taskqueue")        
        taskqueue.add(url='/api/timezone/setTimeZone',target='timezonebackend')        
        logging.info("Out Of taskqueue")
调用/api/timezone/setTimezone时,如果我正在使用主应用程序的任何函数或文件,它会给出未定义的,因为它为backends.yaml中给定的命名函数创建seprate版本(我想使用主应用程序py文件夹中的文件)


这不是一个关于后端的问题


在任何Python代码中,如果您想使用在另一个文件中定义的函数或变量,您需要先导入它。

这不是只导入的事情,您不理解我的问题,我要使用的文件位于我的主应用程序中,当我尝试导入它时,它作为后端创建seprate版本。它的give未定义错误和原因后端和主应用程序的版本不同。所以这是关于后端的问题。
backends:
- name: timezonebackend
class: B4
instances: 1
options: dynamic
start: gapi/timezone_service.py