Jul-31-2018, 07:33 AM
I'm using gspread (to write data to Google spreadsheet) and my app runs on Heroku.
I credentials json file (for gspread), that I don't want to put on Git and I can't manually upload to Heroku.
What is the best way access this data in the server so that my code can run there as well? maybe write some of the information in environment variables and read it in my app?
This is the code that I have now:
I credentials json file (for gspread), that I don't want to put on Git and I can't manually upload to Heroku.
What is the best way access this data in the server so that my code can run there as well? maybe write some of the information in environment variables and read it in my app?
This is the code that I have now:
scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive' credentials = ServiceAccountCredentials.from_json_keyfile_name('credentials.json', scope)Thanks.