Google Drive with Python, but easy
The easiest way to interact with the Google Drive API to perform the tasks you need.
Important
To use this library and be able to interact with the Google Drive API you need an Oauth2 ID and the Google Drive API enabled in your Google account. If you don't know about this, check the google-auth-easy dependency and the instructions to connect. You can find the project in Pypi and the code in Github (https://github.com/Implosiv3/google-drive-easy).
Instructions
- Go to the Google Developers console: https://console.cloud.google.com.
- Make sure you have enabled the Google Drive API.
Usage
from google_drive_easy import GoogleDrive
from google_auth_easy import GoogleAuth
from google_auth_easy.config import GoogleAuthConfig
from google_auth_easy.scopes import Scope
# Authenticate in Google
auth = GoogleAuth(
GoogleAuthConfig(
client_secret_file = 'client_secret.json',
)
)
auth.authenticate(
Scope.DRIVE,
)
# Connect to Google Drive
drive = GoogleDrive(auth)
# Upload file
file = drive.upload_file('test_files/test.txt')
# Share Google Drive resource
link = drive.create_share_link(file.id)
# Delete file
drive.delete_file(file.id)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file google_drive_easy-0.0.1.tar.gz.
File metadata
- Download URL: google_drive_easy-0.0.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.0 CPython/3.9.0 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aaad232b568bae24c088e0d0eb0458887c2ef442d0141716b2d64bd9b526e090
|
|
| MD5 |
d1189e3988c7f4d819603e20e65c3676
|
|
| BLAKE2b-256 |
775647829247b228174439aee59b92f1f402481147bed65be131bd34acf1ae26
|
File details
Details for the file google_drive_easy-0.0.1-py3-none-any.whl.
File metadata
- Download URL: google_drive_easy-0.0.1-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.0 CPython/3.9.0 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ff9e9666bdb48c758f66dcde24f72eff1838e3d9b31deb7281e99c57598b0b3
|
|
| MD5 |
8ea45b937a1d995e9131c60c14fe5c63
|
|
| BLAKE2b-256 |
2b45e4346a1fc0f7b20204fa00c516507f96bbfbf968d16fe6884ce652f14e91
|