Skip to main content

PyPI version

drivedl

This is a CLI tool for concurrent downloads of directories in any drive type. (My Drive, Team Drive or Shared with me)

The tool requires the 'https://www.googleapis.com/auth/drive' scope as of now. This scope can be tightened since all that the script needs is permission to traverse and download data from the drives. Feel free to PR a different scope if it is more relevant

Installation:

  • Install the binary through PyPI using the following command:
$ pip install drivedl

Pre-requisites:

  • Download credentials.json for a Desktop drive application. Instructions on how to get that can be found here (refer to Step 1)
  • Save the credentials.json file in the same directory as drivedl.py
  • Install the Drive API for python by running the following command:
$ pip install -r requirements.txt

Usage:

$ python drivedl.py <folder_id / file_id> <path_to_save>

It is as straightforward as that!

Note that on the first run, you will have to authorize the scope of the application. This is pretty straightforward as well!

Skipping existing files:

Adding an argument --skip to your command will skip existing files and not redownload them.

  • By default the behaviour is to download everything without skipping.

Assigning extra processes:

Adding an argument --proc followed by an integer of processes to assign the application will spawn the specified processes to do the download

  • Example: --proc 10 for 10 processes

Downloading using process map instead of an iterated map:

Adding an argument --noiter tells the program to download via process.map instead of process.imap_unordered. This lets you download faster with the drawback of no process bar being shown because of no iterable item. Recommended to be used if speed is of essence.

Add extra accounts:

Run the following command to add a new account. (Adding an account means that it will also be searched when using drivedl)

$ python drivedl.py --add

You will have to authorize the scope of the application for the new account as well. The token will automatically be saved for future uses once permission is granted!

Searches:

If you add --search to your command, you can search for the folder name using keywords instead of using the folder link or the folder ID. This searches through all drives in all registered accounts and gives a maximum of 10 results per drive. There is no cap on the global maximum results. The search is limited to folders and will not index loose files.

An example of usage is as follows:

$ python drivedl.py "avengers endgame" --search "D:/Google Drive Downloads"

This also works with default path configurations (stated below).

Default Path [Optional]

$ python drivedl.py --path <default_path>

This lets you specify a default path for your download location.

Debugging:

Adding --debug writes a log file once the entire task is completed so that any issues can be documented. This is helpful while making GitHub issues to pinpoint issues with the script.

TODO:

  • Add URL parsing
  • Add default path
  • Single file download support
  • Color support
  • Multi-Account support
  • Skip existing files
  • Search functionality
  • Functionality to download docs

Metadata

Release files for drivedl 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for drivedl 1.2
File Size Uploaded Provenance Actions
drivedl-1.2.tar.gz 7.5 kB Without provenance Details for drivedl-1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for drivedl 1.2
File Interpreter ABI Platform Actions
drivedl-1.2-py3-none-any.whl Python 3 none any Details for drivedl-1.2-py3-none-any.whl

Total release size: 16.8 kB

Release files / drivedl-1.2.tar.gz

Download URL drivedl-1.2.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
081f258c2bd7b5ae11d9495b2d37de5c1266ae9d2db3b8cd221cff948a135bb9
BLAKE2b-256 checksum
How to use checksums
5750d51fd8ff7f51b0e1fee74810584c2fcc340a4b1beaa22b4b51465724ea36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1

Release files / drivedl-1.2-py3-none-any.whl

Download URL drivedl-1.2-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd78775789ceec147a22cb4c900f54ae1d9c6e8d8d0c31b533f5316dc1d742d2
BLAKE2b-256 checksum
How to use checksums
b0a70d4a3dbd4b4ca13fe76c8c8316208c4f0a981ea978c8d617b77400be3de1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1

Security for drivedl 1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page