Skip to content

Instantly share code, notes, and snippets.

@tekeburak
Created February 22, 2018 00:09
Show Gist options
  • Save tekeburak/59ab6a785594b9d0e403be9641ad4840 to your computer and use it in GitHub Desktop.
Save tekeburak/59ab6a785594b9d0e403be9641ad4840 to your computer and use it in GitHub Desktop.
Generate creds for the Drive FUSE library
# Generate creds for the Drive FUSE library.
from oauth2client.client import GoogleCredentials
creds = GoogleCredentials.get_application_default()
import getpass
!google-drive-ocamlfuse -headless -id={creds.client_id} -secret={creds.client_secret} < /dev/null 2>&1 | grep URL
vcode = getpass.getpass()
!echo {vcode} | google-drive-ocamlfuse -headless -id={creds.client_id} -secret={creds.client_secret}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment