Giter Site home page Giter Site logo

ktintc / gcs-oauth2-boto-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlecloudplatform/gcs-oauth2-boto-plugin

0.0 2.0 0.0 337 KB

Auth plugin allowing use the use of OAuth 2.0 credentials for Google Cloud Storage in the Boto library.

License: Apache License 2.0

Python 100.00%

gcs-oauth2-boto-plugin's Introduction

gcs-oauth2-boto-plugin

gcs-oauth2-boto-plugin is a Python application whose purpose is to behave as an auth plugin for the boto auth plugin framework for use with OAuth 2.0 credentials for the Google Cloud Platform. This plugin is compatible with both user accounts and service accounts, and its functionality is essentially a wrapper around the oauth2client package of google-api-python-client with the addition of automatically caching tokens for the machine in a thread- and process-safe fashion.

For more information about how to use this plugin to access Google Cloud Storage via boto in your application, see the GCS documentation.

Client Id and Client Secret fallback logic:

  1. .boto config, if not set
  2. environment variables (OAUTH2_CLIENT_ID and OAUTH2_CLIENT_SECRET), if not set
  3. CLIENT_ID and CLIENT_SECRET values set by SetFallbackClientIdAndSecret function.

Default locking mechanism used is threading.Lock. You can switch to using another locking mechanism by calling SetLock. Example:

SetLock(multiprocessing.Manager().Lock())

Before submitting any code, please run the tests (e.g., by running the following command from the root of this repository): python oauth2_plugin/test_oauth2_client.py

gcs-oauth2-boto-plugin's People

Contributors

jterrace avatar zwilt avatar

Watchers

 avatar  avatar

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.