Pyfilesystem2 implementation for Google Drive
Project description
fs.googledrivefs
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fs.googledrivefs-1.0.2.tar.gz
.
File metadata
- Download URL: fs.googledrivefs-1.0.2.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0a2 CPython/3.7.3 Darwin/18.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3e778eee5804172a6393c4058fbd87082e17cab23d98869b8e9925ea87e5422 |
|
MD5 | 6b28dfaeaecb315e6b8fd4e4c3de4d5a |
|
BLAKE2b-256 | 6308c8cecce03a99484815e2fc9a31c66b7c9bb00e20c129626ed56a445fe483 |
File details
Details for the file fs.googledrivefs-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: fs.googledrivefs-1.0.2-py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0a2 CPython/3.7.3 Darwin/18.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed91f3d769123590a41647c243f4804984c98ce8485a1aae7a2b5d95b29fafa7 |
|
MD5 | 2b208c76694d64882677e941e4c6f75c |
|
BLAKE2b-256 | b09c156ae3625452725be84a86b8f975f3a9856de8f6da99b8142fdb54ebc006 |