Created
October 12, 2018 20:42
-
-
Save david-macleod/eed7dabee0dac4c0b47f66fa9012c7d6 to your computer and use it in GitHub Desktop.
Google drive authentication in colab notebook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pydrive.auth import GoogleAuth | |
from pydrive.drive import GoogleDrive | |
from google.colab import auth | |
from oauth2client.client import GoogleCredentials | |
auth.authenticate_user() | |
gauth = GoogleAuth() | |
gauth.credentials = GoogleCredentials.get_application_default() | |
drive = GoogleDrive(gauth) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment