Concurrent Google Drive folder downloader with tqdm progress bars
Project description
grgdrive-dl
A concurrent Google Drive folder downloader built on the official google-api-python-client SDK. Downloads up to 5 files in parallel, shows a tqdm progress bar, and is installable in one command.
pip install grgdrive-dl
grgdrive-dl -c credentials.json -f "https://drive.google.com/drive/folders/<ID>" -d ./output
Features
- Official SDK — uses
google-api-python-client+google-auth(service account auth) - Concurrent downloads —
ThreadPoolExecutorwith configurable worker count (default 5) - Progress bar — live
tqdmprogress across all files - Recursive — walks nested folder trees automatically
- Google-native export — Docs → PDF, Sheets → XLSX, Slides → PDF, Drawings → PNG
- Skip-existing flag — resume interrupted downloads without re-downloading
- Shared Drive support —
--all-drivesflag for Team Drives - PyPI package —
pip installand use as a CLI or Python library
Installation
pip install rgsuhas-drive-downloader
Requires Python 3.9+.
Authentication
This tool uses a Google Cloud Service Account.
- Go to the Google Cloud Console.
- Create or select a project and enable the Google Drive API.
- Create a Service Account under IAM & Admin → Service Accounts.
- Download the JSON key file for that service account.
- Share your Drive folder with the service account's email (found in the JSON as
client_email).
Usage
CLI
rgdrive-dl --credentials path/to/sa-key.json \
--folder "https://drive.google.com/drive/folders/FOLDER_ID" \
--dest ./my-downloads
| Flag | Short | Default | Description |
|---|---|---|---|
--credentials |
-c |
required | Path to Service Account JSON key |
--folder |
-f |
required | Drive folder ID or share URL |
--dest |
-d |
. |
Local destination directory |
--workers |
5 |
Concurrent download threads | |
--all-drives |
off | Include Shared Drive items | |
--skip-existing |
off | Skip already-downloaded files |
Example — resume a partial download with 8 threads:
rgdrive-dl -c sa-key.json -f 1A2B3C4D5E --dest ./data --skip-existing --workers 8
Python API
from gdrive_dl import GoogleDriveClient, FolderDownloader
client = GoogleDriveClient("path/to/sa-key.json")
downloader = FolderDownloader(
client,
include_all_drives=False,
skip_existing=True,
max_workers=5,
)
downloader.download(folder_id="1A2B3C4D5E6F", dest_dir="./output")
Example Output
rgdrive-dl 1.0.0
folder : 1A2B3C4D5EFGhijklmno
dest : ./output
workers : 5
Collecting file list…
Found 42 file(s) to process.
download report_2024.pdf
download dataset.csv
download presentation.pptx
exported notes (Google Doc) → notes.pdf
Progress: 100%|████████████████████| 42/42 [00:18<00:00, 2.3 file/s]
All done.
Publishing to PyPI
# Install build tools
pip install build twine
# Build the distribution
python -m build
# Upload to PyPI (requires a PyPI account + API token)
twine upload dist/*
Development
git clone https://github.com/rgsuhas/drive-downloader.git
cd drive-downloader
pip install -e ".[dev]"
License
MIT © Suhas RG
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rgdrive_dl-1.0.0.tar.gz.
File metadata
- Download URL: rgdrive_dl-1.0.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12f1485d96694343b2940c5eda76a8006177e6b9fced72e39be434843d0de7a1
|
|
| MD5 |
de95e7aba61156814ba0bcbf1dbe4f08
|
|
| BLAKE2b-256 |
96aca1434926d994f9d1e82424e93e19d5a25ce1acf4a711bc9f05baf6e70c56
|
File details
Details for the file rgdrive_dl-1.0.0-py3-none-any.whl.
File metadata
- Download URL: rgdrive_dl-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dfa196aac4c3de7c0488207939456792065d6949663943da4ebf1e1f8ec28ef
|
|
| MD5 |
0107426ab5e86a683379277ada25b919
|
|
| BLAKE2b-256 |
5e07f80ea75baf961373cd9f4fbf0cd97c0233d33a38c93f973aad70590a1ae4
|