Skip to main content

Pyfilesystem2 implementation for Google Drive

Project description

fs.googledrivefs

Builds Coverage report PyPI version

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 mostly under the /test-googledrivefs directory in the user's Google Drive and a few in the root directory

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

Uploaded Source

Built Distribution

fs.googledrivefs-1.5.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fs.googledrivefs-1.5.0.tar.gz
Algorithm Hash digest
SHA256 04c65b437a9fda52143f62d6f261b027bc4e83d2f0b493cc82754685ab7e4880
MD5 5777794753e0f40645e831ede6e77a83
BLAKE2b-256 8ae75da7879ddc2cf55ebc7432b452c4f69c73249a8329a32da750c88c74f409

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fs.googledrivefs-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08ddfde5f8475194e6b7b9f81583f31a624e194be69bafb96df6098f4330faa6
MD5 f13e51b6afa4f4d862898797d74f938b
BLAKE2b-256 30a398ce92153f2a1735990e8619ca43073b210d841830b411707bb9cf66c1cc

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