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)
Metadata
Release files for google-drive-easy 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| google_drive_easy-0.0.3.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| google_drive_easy-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.8 kB
Release files / google_drive_easy-0.0.3.tar.gz
| Download URL | google_drive_easy-0.0.3.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7fde9e21cf1b1ea07f1a30b9c3d866fa9366f002fc935de1d97641a259b64d42
|
|
BLAKE2b-256 checksum How to use checksums |
34fbd3cf40639d94d00dbe4819b451d12aded9287c2bb423584ccf0633b17589
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.0 CPython/3.9.0 Windows/10
|
Release files / google_drive_easy-0.0.3-py3-none-any.whl
| Download URL | google_drive_easy-0.0.3-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4ae13be245a767625a5ce0f5e50d1776bef25c7b002a553303555c5732dac873
|
|
BLAKE2b-256 checksum How to use checksums |
10b561b79a04e263e723120108dbe26425f49e634e3276862f95697d88564d96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.0 CPython/3.9.0 Windows/10
|