sources.py 文件源码

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

项目:luigi-warehouse 作者: groupon 项目源码 文件源码
def __init__(self, cfg_name='google_drive'):
        import gspread
        from oauth2client.client import SignedJwtAssertionCredentials
        credentials_json = json.loads(luigi.configuration.get_config().get(cfg_name, 'credentials_json'))
        client_email = credentials_json["client_email"]
        private_key = credentials_json["private_key"]
        scope = ['https://spreadsheets.google.com/feeds']
        credentials = SignedJwtAssertionCredentials(client_email, private_key.encode(), scope)
        self.client = gspread.authorize(credentials)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号