App Engine helpers for ZSH

Here are some zsh helpers for Google App Engine will save you lot of typing in the long run. I’ve extendend the oh-my-zsh project with my own plugin for Google App Engine, but you can easily just add these to your .zshrc.

Uploading app

To use this alias you need to define GAE_EMAIL and GAE_PASS in your .zshrc. This saves you typing them in the first time.
alias gaeup="echo $GAE_PASS|$GAE_SDK/appcfg.py update . --email=$GAE_EMAIL --passin"

Helpers for bulkloader

Using bulkloader to download/restore multiple entities can be painful with all the manual steps. This helper is for downloading raw entity data from a live site for given Kind. Usage: gaebulkdl Kind app_id. Note: the _ah/remote_api is default for Python SDK 1.3.8 builtins.
function gaebulkdl() { echo $GAE_PASS|$GAE_SDK/bulkloader.py --dump --kind $1 --filename=$1.bin \ --url=http://$2.appspot.com/_ah/remote_api --email=$GAE_EMAIL --passin }

This function is for restoring downloaded data. Usage: gaebulkup Kind localhost.fi:8080 app_id email password
function gaebulkup() { echo $5|$GAE_SDK/bulkloader.py --restore --kind=$1 --filename=$1.bin \ --url=http://$2/_ah/remote_api --app_id=$3 --email=$4 --passin }

Comments

blog comments powered by Disqus
Fork me on GitHub