Last active
March 12, 2024 13:30
-
-
Save leingang/229ed6b26c4ff4c2e1555217900f162e to your computer and use it in GitHub Desktop.
Allow a Google Colaboratory Jupyter Notebook to access Google Drive files
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 pydrive2.auth import GoogleAuth | |
from pydrive2.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