Skip to main content

Pyfilesystem2 implementation for Google Drive

Project description

fs.googledrivefs

https://travis-ci.org/rkhwaja/fs.googledrivefs.svg?branch=master https://coveralls.io/repos/github/rkhwaja/fs.googledrivefs/badge.svg?branch=master

Implementation of pyfilesystem2 file system for Google Drive

Usage

fs = GoogleDriveFS(credentials=<google-auth credentials>)

# fs is now a standard pyfilesystem2 file system

fs2 = open_fs("googledrive:///?access_token=<oauth2 access token>&refresh_token=<oauth2 refresh token>&client_id=<oauth2 client id>&client_secret=<oauth2 client_secret>")

# fs2 is now a standard pyfilesystem2 file system

Running tests

To run the tests, set the following environment variables:

  • GOOGLEDRIVEFS_TEST_CREDENTIALS_PATH - path to a json file which will contain the credentials

  • GOOGLEDRIVEFS_TEST_CLIENT_ID - your client id (see Google Developer Console)

  • GOOGLEDRIVEFS_TEST_CLIENT_SECRET - your client secret (see Google Developer Console)

Then generate the credentials json file by running

python generate-credentials.py

Then run the tests by executing

pytest

in the root directory. The tests may take an hour or two to complete. They create and destroy many, many files and directories exclusively under the /test-googledrivefs directory in the user’s Google Drive

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fs.googledrivefs-1.3.1.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

fs.googledrivefs-1.3.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file fs.googledrivefs-1.3.1.tar.gz.

File metadata

  • Download URL: fs.googledrivefs-1.3.1.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.8.3 Darwin/19.4.0

File hashes

Hashes for fs.googledrivefs-1.3.1.tar.gz
Algorithm Hash digest
SHA256 9cda2f17924341365909e33dd1ef177f6f02bf9dad4f8cc189bc648bb7be61cf
MD5 6ec3d80a1966d77dde56a0296253675a
BLAKE2b-256 d0d7c9abae36224cacdce8642f1a66b1808ac78fcbc6b968c2ef12df647e881a

See more details on using hashes here.

File details

Details for the file fs.googledrivefs-1.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for fs.googledrivefs-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 27ff33f355d7f877afdc7a3b45da3ace0bcebc31207707cf160c7a467e785039
MD5 a69d783595ce619f2d96dc1b24d22e90
BLAKE2b-256 e211f97b2e39039069fbbcb9c92d332b8e54b18874f618eec904c67a3c08410a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page