1

How can I write application code to check between AppEngine applications running in development vs running in Production?

1 Answer 1

1

You can check the enviornmental variable SERVER_SOFTWARE

# Check for appengine app identity. app_env = os.getenv('SERVER_SOFTWARE', None) if app_env: if app_env.startswith('Google App Engine/'): # Appengine Production print("Appengine Production Detected") if app_env.startswith("Development") or app_env.startswith("AppScaleServer"): # Dev or appscale env print("Local Dev / appscale detected") else: print("app_env not declared") 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.