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 mostly under the /test-googledrivefs directory in the user's Google Drive and a few in the root directory
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.7.0.tar.gz
.
File metadata
- Download URL: fs.googledrivefs-1.7.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/3.8.2 Windows/7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a2f7a4509e521a45abb438eb198f0426efe5a102cbff66571d6d7e6e1fa39ce |
|
MD5 | e2a8d5b7430186d3e68a53b5ed1e9c8b |
|
BLAKE2b-256 | e730fd6562acf40e3970226d57493eea7de91128fe363624d4ce5a7630151bff |
File details
Details for the file fs.googledrivefs-1.7.0-py3-none-any.whl
.
File metadata
- Download URL: fs.googledrivefs-1.7.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/3.8.2 Windows/7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a836d9dae50bca6f7fa23a8b03357b9a3d8c21ab26526d2d2260e3a629eef0be |
|
MD5 | 348ea47c3e115a3b9e3dbf030cd35b95 |
|
BLAKE2b-256 | fb0dcc1c92b2038f1ce7f6efba11b598551c4d3073f61d169f5aca858f07d443 |