Skip to main content

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

Metadata

Release files for driveup 0.9.18

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

Source distribution (sdist)

Source distribution for driveup 0.9.18
File Size Uploaded
driveup-0.9.18.tar.gz 17.5 kB Details

Built distribution (wheel)

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

Total release size: 34.3 kB

Release files / driveup-0.9.18.tar.gz

Download URL driveup-0.9.18.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b626daa87355f667148588a75e0fc8011e9c8e9de05701e69a2f1140c08405a7
BLAKE2b-256 checksum
How to use checksums
8de395258d6e2b9bfbeb48f918c3a81c80b7049dd1b976530820896e782610df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / driveup-0.9.18-py3-none-any.whl

Download URL driveup-0.9.18-py3-none-any.whl
Size 16.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c99a0ad057053e6913d067ffe4912874e0ed0be97c90de31249e5b84086a3b4f
BLAKE2b-256 checksum
How to use checksums
7abb1db88bb90d1acb92b0bbb7d6bdf4f0b5e69694b587d38a50f448609d2f80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

0.9.18 This release

2 release files

0.9.17

2 release files

0.9.16

2 release files

0.9.15

2 release files

0.9.14

2 release files

0.9.13

2 release files

0.9.12

2 release files

0.9.10

2 release files

0.9.9

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.4

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.0

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.5

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.0

1 release file

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