Python Forum
Best practice for sharing gspread credentials to server
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Best practice for sharing gspread credentials to server
#1
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:
scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive'    
credentials = ServiceAccountCredentials.from_json_keyfile_name('credentials.json', scope)
Thanks.
Reply


Messages In This Thread
Best practice for sharing gspread credentials to server - by shlomiLan - Jul-31-2018, 07:33 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Web scrapping login facebook credentials kosmas9 0 1,958 Aug-17-2020, 01:33 PM
Last Post: kosmas9
  How to resolve a 401 error, when the credentials work fine in a browser PyCurious 4 10,877 Apr-21-2020, 08:05 PM
Last Post: PyCurious

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020