Q:

PyDrive client_secrets from other directory

I'm using PyDrive to upload files to GoogleDrive from a desktop Python app that I'm packaging with Pyinstaller. I'd like to hide the client_secrets.json as much as possible so I've embedded it within the Pyinstaller .exe file, using this solution: Bundling Data files with PyInstaller 2.1 and MEIPASS error --onefile
Yet, PyDrive is not finding the client_secrets file from the temp directory where Pyinstaller places data file.
How do I get PyDrive to read the json file from another directory, particularly AppData? I was thinking of moving the file from the temp directory to the working directory before authenticating and deleting if after, but some users don't have admin access and can't modify Program Files (where the app is installed)
I see I can use a settings.yaml file that I can refer to another directory, but pyinstaller seems to place the embedded client_secrets.json in a temp folder using a sys._MEIPASS variable, so I don't know where it will be.
I would have to pass that valuable to GoogleAuth() directly, is there a way to do this?

A:

Much easier solution:
from pydrive.auth import GoogleAuth
GoogleAuth.DEFAULT_SETTINGS['client_config_file'] = path_to_secrets_file

