base.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:kfusiontables 作者: kula1922 项目源码 文件源码
def build_service(self):
        """
        Build service for connect to google fusiontables.
        """

        logger.info('Build service for connect to google fusiontables server.')

        try:
            credentials = ServiceAccountCredentials.from_json_keyfile_name(
                self.PATH_TO_KEY,
                scopes=['https://www.googleapis.com/auth/fusiontables']
            )
            http_auth = credentials.authorize(Http())
        except IOError:
            raise IncorrectAccessFilePathException(
                "Access key path '{0}' is incorrect.".format(
                    self.PATH_TO_KEY
                )
            )

        self.SERVICE = build('fusiontables', 'v2', http=http_auth)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号