Note: This framework is available to Python 2.7 users only.
A web application framework can simplify development by taking care of the details of the interface, letting you focus development effort on your applications features. App Engine includes a simple web application framework called webapp2 - a lightweight framework that allows you quickly build simple web applications for the Python 2.7 runtime.
webapp2 is compatible with the WSGI standard for Python web applications. You don't have to use webapp2 to write Python applications for App Engine. Other web application frameworks, such as Django , work with App Engine, and App Engine supports any Python code that uses the CGI standard. The webapp2 project, by Rodrigo Moraes, started as a fork of the App Engine webapp framework, which was used by the Python 2.5 runtime. webapp2 includes a number of features that make developing web applications easier, such as improved support for URI routing, session management and localization. The Python 2.7 runtime uses webapp2, and the project is maintained externally to App Engine. It is supported, but not maintained, by Google.
For more information about webapp2, see the official documentation .
Using the webapp2 framework in Python 2.7
Python 2.7 applications can use either WSGI or CGI to handle requests, but WSGI is generally recommended (see Using WSGI ).
Learn to build a simple webapp2 application that uses a WSGI interface in Python Tutorial > Hello, World!
Blobstore, Mail and XMPP Handlers
Since it is an external library, webapp2 does not provide any App Engine-specific
services. Python 2.7 apps must use the webapp versions of
BlobstoreUploadHandler
and
BlobstoreDownloadHandler
.
See
webapp
Blobstore Handlers
for details.
Similarly, webapp provides mail and XMPP handlers which are not available in webapp2. See Receiving Email and Handling Incoming Calls for more information.