Python 2.7 has reached end of supportand will bedeprecatedon January 31, 2026. After deprecation, you won't be able to deploy Python 2.7applications, even if your organization previously used an organization policy tore-enable deployments of legacy runtimes. Your existing Python2.7 applications will continue to run and receive traffic after theirdeprecation date. We recommend thatyoumigrate to the latest supported version of Python.

The webapp2 Framework

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 application's features. App Engine includes a simple web application framework calledwebapp2 - 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 Enginewebapp 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 theofficial 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.

Blobstore and Mail 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 ofBlobstoreUploadHandler andBlobstoreDownloadHandler. Seewebapp Blobstore Handlers for details.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.