03 February 2009 ~ Comments Off

Basics of Google App Engine

Developing a Google App using the App engine is quick and easy! If you have a background in python then its even easier! For most of us that don’t have a lot of python in our background it becomes a little more challenging.

Our first step is to get the foundation of python so we can work with the Google frameworks. So like most frameworks or code, we have a config/application file. This file is used to direct routes for URL’s to access many files in your application and to define a version and runtime.

app.yaml

1
2
3
4
5
6
7
8
application: helloworld
version: 1
runtime: python
api_version: 1
 
handlers:
- url: /.*
  script: helloworld.py

Now lets create the “helloworld.py” file.

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

Very similar to php using print.

Now that you have the basic files to run an application you can now start the app by clicking run on the Google app engine tool. Visit the app via “http://localhost:8080″. You should now see “Hello, world!”

I will be covering more python and Google App Engine in the coming weeks. Thanks for reading.

Comments are closed.