def __init__(self, credential_path, spreadsheet_name):
scope = ['https://spreadsheets.google.com/feeds']
credentials = ServiceAccountCredentials.from_json_keyfile_name(credential_path, scope)
self.gc = gspread.authorize(credentials)
logging.info('Sheet service client authorized, credential path: %s' % credential_path)
self.spreadsheet = self.gc.open(spreadsheet_name)
pass
评论列表
文章目录