appengineGoogle App Engine (GAE), an Amazon Web Services like platform that lets you host and run web applications in the cloud, has come a long way in the last three years. The App Engine now hosts more than 200,000 apps that serve over 1.5 billion views daily. Even the Royal Wedding site was hosted on App Engine.

At the ongoing Google IO event, Google introduced App Engine 1.5.0 that, among several other enhancements, lets project owners download the source code of applications that they have previously deployed on Google App Engine.

This is good news because earlier, if you lost the local copy of your application’s source code – say because of an hard disk crash or because the developer had left the company – you had to rewrite the whole application from scratch even for making minor changes.

Downloading the Source Code from App Engine

Here’s how you may download the source code of any of your App Engine apps using the command line tool:

Step 1. Create a new directory for storing the downloaded files. The App Engine runtime requires that the directory be empty before it can download the files to that directory.

Step 2. Switch to the directory where App Engine is installed on your computer. It is usually under the following path:

C:\Program Files\Google\google_appengine

Step 3. Execute the following command to download the project. Remember to replace MyAppName with the ID of your own App Engine project.

appcfg.py download_app  – A MyAppName -V 1 c:\AppEngine\SourceCode

It’ll ask for your Google Account credentials and once authenticated, all the source code files will instantly download to the specified directory. Obviously, you can only download the source code of your own applications from App Engine.

Here’s a screencast demonstrating the download process (sorry for the video quality).