rdodev
rdodev

Reputation: 3192

Google Storage Client Library from outside AppEngine

I'm curious, is there a way I could use the new Google Cloud Storage client library from outside AppEngine? If so, how would I go about setting the credentials/API key? I looked though the sparse documentation, to no avail. Any help is much appreciated.

Thanks.

Upvotes: 0

Views: 292

Answers (2)

Sebastian Kreft
Sebastian Kreft

Reputation: 8189

It should be possible to use gcs client from outside GAE, however you will still need to have the GAE SDK so the imports can work.

Take a look at the method common.set_access_token, you would need to refresh the token by yourself however.

If you are willing to dig further, you can take a look at the constructor of the _RestApi class which receives a token maker function.

This is an open source project and changes are welcomed.

Upvotes: 1

Brandon Yarbrough
Brandon Yarbrough

Reputation: 38369

Google Cloud Storage and Google AppEngine are separate products that can be used seperately. AppEngine provides an AppEngine-specific client for Google Cloud Storage that provides several useful features for developing an AppEngine app that will use Google Cloud Storage, which I believe is the library you're referring to.

You can absolutely use Google Cloud Storage from outside AppEngine, but you cannot use AppEngine's GCS library to do so. Instead, you'll have to use one of GCS's APIs or client libraries. There are two main APIs (XML and JSON-based), and also client libraries for many major languages, including Python and Java.

For getting started, check out https://developers.google.com/storage/docs/signup

Upvotes: 1

Related Questions