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.2.tar.gz (4.4 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.2-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: google_drive_easy-0.0.2.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

Hashes for google_drive_easy-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f0ae9b013db916765b2bb417104e723f6469e95853467153b04490f90e7e80df
MD5 019eb9c3e334461f9662d8d397fc6b8c
BLAKE2b-256 2387b174f2848b7b4cf4b067c0a4c54b957c1c862614fcbb77e6ef2fc969b448

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for google_drive_easy-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9def4a4b769544f51de4fc283138fe9bebe09b9a99205e99609a44e2cbf7b15e
MD5 15ad7fa1f68d07816841ae5fcd311a12
BLAKE2b-256 3bed65e56aff86c88c276a8ecebb7f618ec91aa0f39952983c064cc0d946aedc

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