I am creating a web application using googles app engine with the python 3.7 standard environment. I am passing values from the app.yaml file to my main script, however, I cannot seem to pass a list from the yaml file to the main file.
Here is my app.yaml file:
runtime: python37
handlers:
# This configures Google App Engine to serve the files in the app's static
# directory.
- url: /static
static_dir: static
env_variables:
USERS: 'myemail@email.com'
USERS2: ['myemai@email.com', 'youremail@email.com']
USERS3:
- 'myemail@email.com'
- 'youremail@email.com'
USERS4:
- 'myemail@email.com'
- 'youremail@email.com'
Here is my python script:
import os
users = os.environ.get('USERS')
users2 = os.environ.get('USERS2')
users3 = os.environ.get('USERS3')
users4 = os.environ.get('USERS4')
The variable users returns 'myemail@email.com'
correctly. Though, users2
, users3
and users4
all return []
(an empty list).