我的GAE应用程序通过Google API与Google的Fusion Tables配合使用。目前我每次向Fusion Tables添加一些数据时都会请求授权:
class TestHandler(webapp2.RequestHandler):
def get(self):
credentials = AppAssertionCredentials(scope='https://www.googleapis.com/auth/fusiontables')
http = credentials.authorize(httplib2.Http(memcache))
service = build('fusiontables', 'v1', http=http)
# addition of the data happens here
但我真的需要这样做吗?可能我应该在某处存储授权数据(http
?)?像memcache一样?然后重新使用它?然后auth数据有效多长时间?或者,它是否已由我使用的Google APIs Client Library for Python完成?