# 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")
您可以检查环境变量^{}
相关问题 更多 >
编程相关推荐