I'm following the guide here and can't seem to get my Python app (which is deployed fine on GCP) to read the environment variables I've created in Cloud Functions.
The REST endpoint for the function returns the environment variables fine as I've coded up the Python method in the function to just do os.environ.get()
on a request parameter that is passed in. However, in my actual deployed application, I don't want to do a REST GET call every time I need an environment variable. I would expect using os.environ.get()
in my application would be enough, but that returns blank.
How does one go about retrieving environment variables on GCP with just a simple os.environ.get()
or do I really have to make a call to an endpoint every time?