This Fall I will be teaching high school math and also developing in Python for schoolytics.io. The most famous last words have to be “How hard can that be?” I have created a lot of projects in Google Apps Script
Making the Move to Python
I am incredibly blessed to be friends with Clay Smith and other amazing coders who are willing to help me with this journey. Clay adapted the Python Quickstart for Google Sheets to use in GCP (Google Cloud Platform).
Who Uses the Cloud?
So my goal has been to do the equivalent of SpreadsheetApp.create() from Google Apps Script in Python. Essentially what I want to do is make a Google Sheets spreadsheet appear in my Drive. I had installed PyCharm to code Python locally on my machine, but I am used to working in the cloud. So I am trying to get it to work in Google Cloud Project (GCP). I have talked with several people who kindly offered to help me and pretty much every single one said “huh, I never did it that way.” So I’m probably heading down the wrong path but I’ll exhaust everything I can learn first. I WILL BE AN OAuth EXPERT EVENTUALLY!
The Python Quickstart Guide for the Google Sheets API assumes that you are working on a local machine. Something Clay was able to figure out only after we spent over an hour trying to understand why the sample code was not working in GCP. See above for his adaptation of the QuickStart guide to use in GCP.
OH, I realize this… how does that help it be QUICK to start?
I can code and create projects in Google Apps Script and not need to do OAuth verification, which we can just rename as “My Nemesis.” Unfortunately, to use GCP you have to start by creating a project and setting up OAuth. So in the coming weeks OAuth will have to move into best friend territory.
Not Successful YET
I am not successful yet in creating a Google Sheets spreadsheet from Python in GCP. But you can find my progress on the Google Doc.