Skip to main content

PyGoogle Drive

PyGoogleDrive is a wrapper library of google-api-python-client that simplifies many common Google Drive API tasks You can just need to create credentials.json and place in your root directory.

Project Info

Features of PyGoogleDrive

  • You can just need to create credentials.json and place in your root directory

  • Simplifies OAuth2.0 into just few lines with flexible settings.

  • Wraps Google Drive API into classes of each resource to make your program more object-oriented.

  • Helps common operations else than API calls, such as content fetching and pagination control.

How to install

You can install PyGoogleDrive with regular pip command.

pip install PyGoogleDrive

How to get credentials.json

  • For credentials.json just visit https://console.developers.google.com/
    1. Create project

    2. Select credentials

    3. Add OAuth 2.0 Client IDs by clicking CREATE CREDENTIALS button

    4. select web application

    5. For Authorized JavaScript origins add http://localhost without ‘/’ in end

    6. For Authorized redirect URIs add http://localhost/

    7. Download file and rename it to credentials.json

    8. Add this file to project directory

OAuth made easy

When you create instance it will automatically open url for google authentication After successfully authentication token.pickle file is created in root directory

from PyGoogleDrive.PyGoogleDrive import PyGoogleDrive

drive = PyGoogleDrive()

Folder management

We can use `drive` instance to create Folder

drive.createfolder('folder_name')

createfolder function will return folder id that is created on Google drive

File management

PyGoogleDrive handles custom file upload.

drive.uploadfile(name, file_path, mimetype, folder_name)

uploadfile function will return file id created on google drive folder_name is optionals if you want to upload file in specific folder then add folder_name = ‘document’

Metadata

Release files for PyGoogleDrive 1.0.1

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

Source distribution (sdist)

Source distribution for PyGoogleDrive 1.0.1
File Size Uploaded Provenance Actions
PyGoogleDrive-1.0.1.tar.gz 3.0 kB Without provenance Details for PyGoogleDrive-1.0.1.tar.gz

Release files / PyGoogleDrive-1.0.1.tar.gz

Download URL PyGoogleDrive-1.0.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
aa2cfcb4ecc9fff8e3cd2a48e0a93629f8f1ea619de729cc3a873cb55dc74ee4
BLAKE2b-256 checksum
How to use checksums
b36d5e510c6e8560bf4c0e9b20f839ba571329696f9c445f1aa12ba2ecb87950
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

Security for PyGoogleDrive 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file No provenance

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