gdown
Download public Google Drive files and folders when curl or wget fail
Repository Health
Technical Analysis
gdown is a Python command-line tool and library for downloading public files and folders from Google Drive. It exists because plain curl and wget choke on Google Drive: large files trigger a virus-scan confirmation page and the share-link URL formats are inconsistent. gdown handles both automatically so downloads actually complete.
Beyond single files, it downloads folders recursively, exports Google Docs, Sheets, and Slides to formats like PDF, DOCX, and CSV, resumes partial downloads, and doubles as a general curl/wget replacement for plain HTTP and HTTPS URLs. It works from the shell or programmatically via a small Python API.
What You Get
- A gdown CLI that accepts Google Drive URLs, share links, or file ids
- A Python download() API for programmatic use in scripts
- Recursive folder downloading from Google Drive
- Export of Google Docs/Sheets/Slides to PDF, DOCX, CSV, and more
- Resumable partial downloads and plain HTTP/HTTPS support as a curl/wget replacement
Common Use Cases
- Fetching datasets or model weights hosted on Google Drive in ML pipelines
- Scripting reproducible downloads of shared research files
- Downloading an entire Drive folder recursively
- Replacing curl/wget for URLs where confirmation pages break automation
Under The Hood
Architecture - gdown parses a Drive URL or id, issues an HTTP request, and detects Google’s virus-scan confirmation page, then re-requests with the confirmation token so large files download in full. Folder downloads walk the Drive folder listing recursively, and document ids are routed to Google’s export endpoints for format conversion. The same core download logic backs both the CLI entry point and the public Python function.
Tech Stack - Pure Python (requiring Python 3.10+), built on the requests library for HTTP with tqdm-style progress reporting. It is distributed on PyPI, installable via pip or uv, and tested through GitHub Actions.
Code Quality - The project is mature and very actively maintained, with a strong repo health profile, CI on every change, and a clear, example-driven README covering both CLI and Python usage. Its long release history reflects steady upkeep as Google Drive’s behavior evolves.
API Design - The interface is intentionally frictionless: paste any Drive URL form and it just works, with flags like —continue, —folder, and format options layered on for advanced needs. The Python API mirrors the CLI with a single download() call, keeping the mental model tiny for both interactive and programmatic use.