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.1.1.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

fs.googledrivefs-1.1.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fs.googledrivefs-1.1.1.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0 CPython/3.7.5 Darwin/19.2.0

File hashes

Hashes for fs.googledrivefs-1.1.1.tar.gz
Algorithm Hash digest
SHA256 c74821b9b388955de5c5cd9b022b539d9ec79031f95a9eb1abee2d93c07746d1
MD5 d9ba01070980c533f83ed1868764c19e
BLAKE2b-256 bb6f48b5d6b10a20b16f3e3ddc7474da1adbe400a83875ced51c42361fe7b361

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fs.googledrivefs-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3df43a27a6460961fc1bff6043b09c2cb97dc2721285db350b688b935687c036
MD5 c0b4b0b6786b71ea2181b62a2fa7821b
BLAKE2b-256 5b9c192462da9e52bc105d1a5615afb772f34fdffea440575eef0f06bde30abe

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