Ejemplo n.º 1
0
 def get_data(self):
     scopes = [
         "https://spreadsheets.google.com/feeds",
         "https://www.googleapis.com/auth/drive"
     ]
     pathjson = core.get_path_credential(self.credentialfile)
     credentials = ServiceAccountCredentials.from_json_keyfile_name(
         pathjson, scopes)
     sheet = gspread.authorize(credentials)
     wks = sheet.open(self.spread_id)
     rows = wks.get_worksheet(self.worksheet_num).get_all_records()
     # print(rows);sys.exit()
     return rows
Ejemplo n.º 2
0
 def __init__(self, pathfile):
     pathcredential = core.get_path_credential(pathfile)
     super().__init__(pathcredential, id)