Skip to main content

Google Storage auth2 plugin with support for passing service key via environment

Project description

gcs-oauth2-boto-env-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 only compatible with service accounts, and it’s functionality is essentially a wrapper around gcs-oauth2-boto-plugin, with the added capability of passing the private JSON key as an environment variable for easy deployment.


Call the following program with the content of the JSON private key set as GOOGLE_OAUTH2_JSON_PRIVATE_KEY environment variable:

import boto
import gcs_oauth2_boto_env_plugin

project_id = 'your-project-id'

header_values = {"x-goog-project-id": project_id}
uri = boto.storage_uri('', 'gs')
for bucket in uri.get_all_buckets(headers=header_values):


All source code is licensed under the MIT License.

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 gcs-oauth2-boto-env-plugin, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size gcs_oauth2_boto_env_plugin-0.1.3-py2-none-any.whl (4.7 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size gcs-oauth2-boto-env-plugin-0.1.3.tar.gz (2.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page