No description, website, or topics provided.
Shell Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Command app.yaml will read the environment variables under key env_variables from file app.yaml. This is the config file format for GCS (Google Cloud Service). An example app.yaml looks like:

application: project-id
version: 1
runtime: python27 
api_version: 1

#other config settings

 DJANGO_SETTINGS_MODULE: 'base.settings'
 GAE_SQL_HOST: '/cloudsql/:dbname'
 GAE_SQL_DBNAME: 'dbname'
 LOCAL_SQL_HOST: 'host_ip_address'
 DEBUG: 'off'

It reads all the env_variables and exports them to your current terminal, so that you can run the app locally to debug.


It only supports bash 4. To install bash 4 on Mac:

#Homebrew installs the new bash under /usr/local/bin/bash
brew update && brew install bash
sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells'
# Change to the new shell
chsh -s /usr/local/bin/bash

Now close your current terminal and start a new one. Run bash --version, you should see version 4.X.X

Install PyYAML:

The shell script relies on a python program to parse the yaml file. You need this module to run the python parser (

pip install pyyaml

Then you're ready to go. Remember to execute it with . /path/to/yamlfile or source /path/to/yamlfile.

If you run it directly, the environment variables won't be exported to your current working shell, rather, they'll be exported to a sub-shell and be gone.