3

I started new app in AppEngine Python3.7 stadard.

I am trying to get credentials using the following snippet, but its failing.

Anybody able to get credentials in GAE standard Python37 ?

Input:

from google.auth import app_engine
credentials = app_engine.Credentials()

Output:

The App Engine APIs are not available
snakecharmerb
  • 47,570
  • 11
  • 100
  • 153
manikantanr
  • 574
  • 3
  • 13

1 Answers1

2

When using App Engine Standard with python 3.7, none of the google.xxx libraries are available. You have to build your own, or use standard Python libraries. This goes for: auth, users, images, search, mail, taskqueue, memcache, urlfetch, deferred, etc., and even the ndb datastore interface.

For datastore, you use google-cloud-datastore or some 3rd party.

For others, you use a standard Python library, e.g.: google.auth => rauth, google.appengine.api.memcache => python-memcached

Read more here: https://cloud.google.com/appengine/docs/standard/python3/python-differences

That page recommends Google Identity Platform or Firebase Authentication to do authorization.

GAEfan
  • 11,244
  • 2
  • 17
  • 33