Google Drive Actions

hrishikeshrt

Hrishikesh Terdalkar

Posted on December 30, 2022

Google Drive Actions

GitHub logo hrishikeshrt / google_drive_actions

Perform common actions using Google Drive API v3

Google Drive API

Simple GoogleDriveApplication class to perform common Google Drive actions such as searching files, downloading entire folders, uploading files, deleting files.

Usage

from application import GoogleDriveApplication

GD = GoogleDriveApplication("path-to-client-secret.json")

# Find files
GD.find_files("hello+world", is_folder=False)

# List entire subtree of the specified folder
GD.list_folder("google-drive-id-of-folder", recursive=True)

# Download entire folder
GD.download_folder("google-drive-id-of-folder")
Enter fullscreen mode Exit fullscreen mode

Create a project on Google Cloud Platform

Wizard: https://console.developers.google.com/start/api?id=drive

Instructions:

References




Google Drive Actions (API v3)

Simple GoogleDriveApplication class to perform common Google Drive actions such as searching files, downloading entire folders, uploading files, deleting files.

Usage

from application import GoogleDriveApplication

GD = GoogleDriveApplication("path-to-client-secret.json")

# Find files
GD.find_files("hello+world", is_folder=False)

# List entire subtree of the specified folder
GD.list_folder("google-drive-id-of-folder", recursive=True)

# Download entire folder
GD.download_folder("google-drive-id-of-folder")
Enter fullscreen mode Exit fullscreen mode
πŸ’– πŸ’ͺ πŸ™… 🚩
hrishikeshrt
Hrishikesh Terdalkar

Posted on December 30, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related