With App Engine, we can build web applications using the Python/Java programming language, and our application runs on Google's scalable infrastructure, and uses large-scale persistent storage and services.
The Python Runtime Environment
App Engine includes a simple web application framework, called webapp, to make it easy to get started.App Engine supports Python 2.5. Our app take advantage of the many libraries, tools and frameworks for Python.
The Development Environment
We can develop and upload Python applications for Google App Engine using the App Engine Python software development kit (SDK).
The Python SDK includes a web server application that simulates the App Engine environment, including a local version of the datastore, Google Accounts, and the ability to fetch URLs and send email directly from your computer using the App Engine APIs. The Python SDK runs on any computer with Python 2.5
Creating the first application
Create a directory named helloworld. All files for the sample application reside in this directory.
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.
The contents of app.yaml file are as below
application: helloworld
version: 1
runtime: python
api_version: 1
handlers:
- url: .*
script: main.py
From top to bottom, this configuration file says the following about this application:
*The application identifier is helloworld. When we register our application with App Engine ,we will select a unique identifier, and update this value. This value can be anything during development. For now, leave it set to helloworld.
*This is version number 1 of this application's code. If we adjust this before uploading new versions of our application software, App Engine will retain previous versions, and let us roll back to a previous version using the administrative console.
*This code runs in the python runtime environment, version "1". Additional runtime environments and languages may be supported in the future.
*Every request to a URL whose path matches the regular expression /.* (all URLs) should be handled by the main.py script.
Working with webapp Framework
App Engine includes a simple web application framework of its own, called webapp. The webapp framework is already installed in the App Engine environment and in the SDK, so do not need to bundle it with our application code to use it.
Read more: Consult Sarath