Skip to main content

Python package for uploading files and folders to Google Drive.

Project description

logo

Driveup logo


Driveup is a python package to upload files and folders to Google Drive.

💬​ Contribution & Questions

Contribution & Questions Type Platforms
🐞​​ Bug Reports [GitHub Issue Tracker]
📦​ Feature Requests & Ideas [GitHub Discussions]
🛠️​ Usage Questions & Discusions [GitHub Discussions]

💼​ Features

  • Simplify google drive api usage
  • Simplify google authorization flow (working both on service and client account in the same way)
  • Upload files and folders to google drive via python
  • Update google sheets content with pandas dataframes
  • Update drive files content in flexible ways
  • Download drive files
  • Import google sheets data directly to a pandas dataframe

​💾​ Install DriveUp

To start using DriveUp use the next command:

pip install driveup

Note: you might have to add this command as a “code” line in order to use Driveup on a Python notebook.

🔧​ Example of use

In this basic example, you can check how to use the package in order to upload an excel file to an specific folder in google drive.

from Driveup.drive import Drive
from Driveup.features.auth import authorize

EXCEL_PATH = 'C:\\Data\\Path\\sample_excel_file.xlsx'
SECRET_PATH = 'C:\\Data\\Path\\Secret\\service_account_key.json'
DRIVE_FOLDER_ID = '1wXpG03SN0RXI7y1QAd03IDGH2eXFD_VS'

creds = authorize(SECRET_PATH)
drive_obj = Drive(creds)
drive_obj.upload(EXCEL_PATH,DRIVE_FOLDER_ID)

🔑​ Getting credentials file

In order to get access to Google Drive's API (required to use this package), you will need either a "service" or a "client" secret .json file (SECRET_PATH variable mentioned in the example of use).

You can follow the next steps to download this file:

1. Create a new proyect

Go to Google Cloud's console and create a new proyect:


2. Enable APIs

Add Drive's and Sheet's API for the new created project:



Search for both Drive and Sheets and click 'enable' button on both.

3. Create credentials

Create a service/client account with access to this new created app and all its permissions:

Set default settings and choose a name for the account:

4. Download secret

Edit the new created account, go to 'KEYS' tab and create one. Download the secret key .json file.

* Special consideration

Note that if you are using a service account, you must share the drive folder in wich you will be uploading files with the service account mail direction for it to be able to find that folder. You can copy this direction from the 'service accounts' tab at the console dashboard:

💳​ License

Driveup is licensed under MIT License.

🗃️ Shields

PyPI downloads

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

driveup-0.8.3.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

driveup-0.8.3-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file driveup-0.8.3.tar.gz.

File metadata

  • Download URL: driveup-0.8.3.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for driveup-0.8.3.tar.gz
Algorithm Hash digest
SHA256 2d8adadaf2fccc52dcbf997b048d880062312b6476a112dcaa0d7e9819b508c0
MD5 eb48e6c9355af617a6d13cac0eb2f969
BLAKE2b-256 f005e3fd6507bc40c29d850da180d1348a4151ac7c07e0f995e3e7232ac1989c

See more details on using hashes here.

File details

Details for the file driveup-0.8.3-py3-none-any.whl.

File metadata

  • Download URL: driveup-0.8.3-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for driveup-0.8.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d15a018325bda3102e7c9aec59ff027d6fe1f1aa8be224eba653fd9001d4f35f
MD5 ad5c8577bc33ac23d9d8af9cca6339bf
BLAKE2b-256 a23ba3d2cdb6287aadf1fa911efdacd2126726632bd2d3eac99b67ceb04f41ab

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page