Wednesday, December 17, 2008

learning google appengine in 5 minutes

Creating an App Engine application is easy, and only takes a few minutes.

First you need to download the following packages

  1. Python
  2. SDK

Creating a Simple Request Handler

Create a directory named helloworld. All files for this application reside in this directory.Inside the helloworld directory, create a file named, and give it the following contents:

print 'Content-Type: text/plain'  
print '' print 'Hello, world!'

This Python script responds to a request with an HTTP header that describes the
content, a blank line, and the message Hello, world!.

Creating the Configuration File

An App Engine application has a configuration file called app.yaml. Among other things, this file describes which handler scripts should be used for which URLs.

Inside the helloworld directory, create a file named app.yaml with the following contents:

application: helloworld
version: 1
runtime: python
api_version: 1

- url: /.*

Testing the Application

google_appengine/ helloworld

Type the following URL and enjoy!



No comments: