Friday, December 04, 2009

App engine [local] hello world in 60 seconds

I'm toying around with a little experiment at http://github.com/mpstx/Ale It helps you get a tool stack configured quickly to do appengine development without affecting your system's default python environment or installed apps -- something I spent more than a little time rolling by hand during the development of Flexvite. Here's a little preview:

To create an _Isolated_ (no global installs/sudos!), local App engine hello world on OS X in 60 seconds, do this:

  1. Environment setup :
    mkdir aehello; cd aehello

  2. Install Ale :
    git init; git submodule add git://github.com/mpstx/Ale.git .ale

  3. Init Ale :
    .ale/init.sh

  4. Install appengine :
     ale install gae

  5. Install createapp :
    ale install createapp

  6. Create a basic app :
    ale createapp helloworldwebapp

  7. Start local server and browser :
    ale gae start



You can now edit helloworld.py and refresh the browser...change should be reflected instantly.

To delete everything just rm -rf the aehello directory and you'll be totally clean again.

To Deploy it to the cloud...

  1. Go create a google app engine account.

  2. create an appid

  3. modify your app.yaml to reflect your new id

  4. To deploy to yourappid.appspot.com :
    ale gae deploy

5 comments:

Erik said...

I haven't developed anything of merit in Appengine, but the pydev plugin for eclipse makes it stupid easy to code/test/deploy.

Matt said...

Agreed. I've used pydev extensively and it is great for local debugging as well.

srid said...

Have you considered using buildout to automate this? There is a buildout recipe for appegine, but last time I tried it .. it sucked. Perhaps you can improve it or write a new one that would work seamlessly.

Anonymous said...

This project uses buldout to set up a GAE development environment http://code.google.com/p/bridal/

Matt said...

Yep I looked at those, but they didn't meet my needs. This app engine example is just the tip of the iceberg of what ale can make easy. (check out the examples for testing, coverage, continuous testing, etc)