GithubHelp home page GithubHelp logo

msb / fs.googledrivefs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rkhwaja/fs.googledrivefs

0.0 1.0 0.0 132 KB

Implementation of a pyfilesystem2 filesystem for Google Drive

License: MIT License

Python 100.00%

fs.googledrivefs's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.