Skip to main content

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

  1. Go to the Google Developers console: https://console.cloud.google.com.
  2. 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

google_drive_easy-0.0.3.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

google_drive_easy-0.0.3-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file google_drive_easy-0.0.3.tar.gz.

File metadata

  • Download URL: google_drive_easy-0.0.3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.0 CPython/3.9.0 Windows/10

File hashes

Hashes for google_drive_easy-0.0.3.tar.gz
Algorithm Hash digest
SHA256 7fde9e21cf1b1ea07f1a30b9c3d866fa9366f002fc935de1d97641a259b64d42
MD5 1b506a8ee1cce843c26cf1c04dd6b14b
BLAKE2b-256 34fbd3cf40639d94d00dbe4819b451d12aded9287c2bb423584ccf0633b17589

See more details on using hashes here.

File details

Details for the file google_drive_easy-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for google_drive_easy-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4ae13be245a767625a5ce0f5e50d1776bef25c7b002a553303555c5732dac873
MD5 949f0652d67681b78d934ff6f8ae51a6
BLAKE2b-256 10b561b79a04e263e723120108dbe26425f49e634e3276862f95697d88564d96

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page