Skip to content

iyendodaniel/Google-drive-uploader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📤 Google Drive Terminal Uploader

A terminal-based Python application that lets you upload files from your local machine to your Google Drive account. Built using the Google Drive API and OAuth 2.0 for authentication.

Features

  • Upload any file to your Google Drive using the terminal
  • Secure authentication with OAuth2
  • Saves token for future use (no need to log in every time)
  • Perfect for simple backups or automation

Requirements

Make sure you have the following installed:

  • Python 3.7+
  • pip

Installation

  1. Clone or download this repository to your system: git clone https://github.com/your-username/google-drive-uploader.git cd google-drive-uploader

  2. Install the required modules: pip install -r requirements.txt

Setup: OAuth Credentials

You must provide a client_secret.json file:

  1. Go to the Google Cloud Console.
  2. Create a project (or use an existing one).
  3. Go to APIs & Services > Credentials.
  4. Click Create Credentials > OAuth Client ID.
  5. Select Desktop App, then download the client_secret.json.
  6. Place it in the same folder as main.py.

If you're not the developer (e.g. you're a coursemate), ask the developer to add your Gmail to the test users list under the OAuth Consent Screen.

How to Use

  1. Run the program: python main.py

  2. Add the file you want to upload in the upload folder.

3.The app will:

  • Ask you to log into your Google account the first time (opens in browser).
  • Create a token file (token.pickle) for future uploads.
  • Ask for the file path of what you want to upload.
  • Upload it to your Google Drive root folder.
  1. Done! The terminal will confirm the upload and show you the file name.

For First-Time Users

  • If you're using this for the first time:
  • You'll be redirected to your browser for Google login.
  • Make sure your Gmail is approved as a test user by the developer.
  • A token.pickle file will be generated automatically for reuse.

Notes

  • If your token.pickle gets deleted, you'll need to log in again.
  • This project uses the drive.file scope, meaning it can only see/edit files created by this app.
  • Do not rename client_secret.json unless you also change the name in main.py.

Credits

Developed by Daniel Iyendo with help from, with love from Sail Campus and a starting project from Master David🧠✨ Uses the Google Drive API.

License

This project is licensed for educational and personal use. You may fork or modify it freely for learning purposes.


Made by Iyendo Daniel Okeoghene

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages