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 | |
"""API calls to download a very large google drive file. The drive API only allows downloading to ram | |
(unlike, say, the Requests library's streaming option) so the files has to be partially downloaded | |
and chunked. Authentication requires a google api key, and a local download of client_secrets.json | |
Thanks to Radek for the key functions: http://stackoverflow.com/questions/27617258/memoryerror-how-to-download-large-file-via-google-drive-sdk-using-python | |
""" |