My App used python libraries provided by the AppEngine Standard Environment. For including the library in my Local Development I followed the instructions on https://cloud.google.com/appengine/docs/python/tools/using-libraries-python-27.
# appengine_config.py
from google.appengine.ext import vendor
# Add any libraries install in the "lib" folder.
vendor.add('lib')
I pip installed the libraries to a folder 'lib' and in appengine_config.py added vendor.add('lib') I would like "vendor.add('lib')" to be effective/run only when the application is in Local and not in Google Cloud.
What is the right way to identify the environment? How about the below in appengine_config.py?
if 'localhost' in os.environ['SERVER_NAME']:
vendor.add('lib')