Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Pyfilesystem2 implementation for Google Drive

Project description


Implementation of pyfilesystem2 file system for Google Drive


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/

Then run the tests by executing


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.

Files for fs.googledrivefs, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size fs.googledrivefs-1.1.0-py3-none-any.whl (9.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size fs.googledrivefs-1.1.0.tar.gz (8.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page