2 This module provides means to detect the App Engine environment.
9 return is_local_appengine() or is_prod_appengine()
12 def is_appengine_sandbox():
13 """Reports if the app is running in the first generation sandbox.
15 The second generation runtimes are technically still in a sandbox, but it
16 is much less restrictive, so generally you shouldn't need to check for it.
17 see https://cloud.google.com/appengine/docs/standard/runtimes
19 return is_appengine() and os.environ["APPENGINE_RUNTIME"] == "python27"
22 def is_local_appengine():
23 return "APPENGINE_RUNTIME" in os.environ and os.environ.get(
25 ).startswith("Development/")
28 def is_prod_appengine():
29 return "APPENGINE_RUNTIME" in os.environ and os.environ.get(
31 ).startswith("Google App Engine/")
34 def is_prod_appengine_mvms():