csv - Dump data from python cron job to google spreadsheets -


i creating csv contains report result of cronjob. want share csv via google spreadsheets - report versioned, dump csv contents same worksheet in same spreadsheet each , every single time.

i have found gspread looked promising unfortunately gives me novalidurlkeyfound errors. python example interacting spreadsheets api v4 (to found here) requires interactivity because of oauth flow.

can point me in right direction? ideally do:

client = spreadsheet.client(credential_file) client.open_spreadheet(url_or_something).open_worksheet(0).dump(csv) print("done") 

i have found answer in github issue:

using gspread, follow official guide receive oauth token. end json file holding credentials.

in order access spreadsheet these credentials however, need share spreadsheet account represented them. in json file there property client_email. share document e-mail address , voila, you'll able open it!


Comments

Popular posts from this blog

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -