Here is a quickpython script that I wrote to upload a file to Google Drive:
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
gauth = GoogleAuth()
drive = GoogleDrive(gauth)
upload_file_list = [#placeholderfilename]
for upload_file in upload_file_list:
gfile = drive.CreateFile({'parents': [{'id': '#placeholderdriveID'}]})
# Read file and set it as the content of this instance.
gfile.SetContentFile(upload_file)
gfile.Upload() # Upload the file.
This script works, but every time it runs it also opens a window to authenticate the account accessing the drive. My goal for this script is to run it every morning with no input. Is there a way to set up the API so I don't need to manually authenticate the account every time I access google drive? Or does Google not allow that?