Skip to main content

Google Drive direct download of big files.

Project description


Download a large file from Google Drive.


Download a large file from Google Drive.
If you use curl/wget, it fails with a large file because of the security warning from Google Drive. Supports downloading from Google Drive folders (max 50 files per folder).


pip install gdown

# to upgrade
# pip install --upgrade gdown


From Command Line

$ gdown --help
usage: gdown [-h] [-V] [-O OUTPUT] [-q] [--fuzzy] [--id] [--proxy PROXY]
             [--speed SPEED] [--no-cookies] [--no-check-certificate]
             [--continue] [--folder] [--remaining-ok]

$ # a large file (~500MB)
$ gdown
$ # gdown 1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ
$ md5sum fcn8s_from_caffe.npz

$ # a small file
$ gdown
$ cat spam.txt

$ # download with fuzzy extraction of a file ID
$ gdown --fuzzy ''
$ cat spam.txt

$ # --fuzzy option also works with Microsoft Powerpoint files
$ gdown --fuzzy ""

$ # a folder
$ gdown -O /tmp/folder --folder

$ # as an alternative to curl/wget
$ gdown -O ip.json
$ cat ip.json
  "origin": ""

$ # write stdout and pipe to extract
$ gdown -O - --quiet | tar zxvf -
$ ls gdown-4.0.0

From Python

import gdown

# a file
url = ""
output = "fcn8s_from_caffe.npz", output, quiet=False)

# same as the above, but with the file ID
id = "0B9P1L--7Wd2vNm9zMTJWOGxobkU", output=output, quiet=False)

# same as the above, and you can copy-and-paste a URL from Google Drive with fuzzy=True
url = "", output=output, quiet=False, fuzzy=True)

# cached download with identity check via MD5
md5 = "fa837a88f0c40c513d975104edf3da17"
gdown.cached_download(url, output, md5=md5, postprocess=gdown.extractall)

# a folder
url = ""
gdown.download_folder(url, quiet=True, use_cookies=False)

# same as the above, but with the folder ID
id = "15uNXeRBIhVvZJIhL4yTw4IsStMhUaaxl"
gdown.download_folder(id=id, quiet=True, use_cookies=False)



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gdown-4.4.0.tar.gz (14.2 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page