Code Monkey home page Code Monkey logo

google-drive-folder-upload's Introduction

Google Drive Folder Upload

Python Client for uploading files to Google Drive


Installation

git clone [email protected]:richtier/google-drive-folder-upload.git
cd google-drive-folder-upload
pip install requirements.txt

Authentication

Login to https://console.developers.google.com and generate an Oauth client id file. Set the "Authorized redirect URIs" to http://localhost:8080/

Then download and open the credentials file to retrieve the client_id and client_secret.

Update settings.yml with the client_id and client_secret

You will be prompted to authenticate the application the first time you run the script, but from that point onwards your session will be remembered.

Usage

Upload single file

Run the following code to upload a file to to Google Drive:

python google_drive_folder_upload/main.py /path/to/file.png

Upload new files in a directory

inotifywait can be used to monitor a folder for new files and upload them to Google Drive. Run the following command to do that:

sudo chmod +x monitor.sh
monitor.sh /path/to/folder

Follow this tutorial to run the monitor.sh as a service.

google-drive-folder-upload's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.