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 tests/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.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

fs.googledrivefs-1.1.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fs.googledrivefs-1.1.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.15 CPython/3.7.3 Windows/7

File hashes

Hashes for fs.googledrivefs-1.1.0.tar.gz
Algorithm Hash digest
SHA256 8f054046c0c937b280825e5ff4aa6216086c3e9d04a8695156f4de933ae71647
MD5 3f6d7b6caa501681fa8b409d0f7f693f
BLAKE2b-256 9e036880b206df3923d5b3f4849cacc1e55178e4700491a451e85b73e41c13f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fs.googledrivefs-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8cb7fdb0525c0a7db37e770c1ddadf9645edc0f2ee404647635d8035253c183a
MD5 af0c594082f22537a834d42f79aea3a7
BLAKE2b-256 e9acfc9df22f4eae5e0048c2790a4eb07093f038f51c943349154ac2079aae3d

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