Python 2.7 has reached end of support
and will be deprecated
on January 31, 2026. After deprecation, you won't be able to deploy Python 2.7
applications, even if your organization previously used an organization policy to
re-enable deployments of legacy runtimes. Your existing Python
2.7 applications will continue to run and receive traffic after their deprecation date
. We recommend that
you migrate to the latest supported version of Python
.
The webapp2 Framework
Stay organized with collections
Save and categorize content based on your preferences.
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
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.
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 of BlobstoreUploadHandler
and BlobstoreDownloadHandler
.
See webapp
Blobstore Handlers
for details.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-29 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[[["\u003cp\u003ewebapp2 is a lightweight web application framework for Python 2.7, simplifying development by handling interface details and allowing developers to focus on application features.\u003c/p\u003e\n"],["\u003cp\u003ewebapp2 is compatible with the WSGI standard but not exclusive; other frameworks like Django are also supported, and any Python code using CGI works with App Engine.\u003c/p\u003e\n"],["\u003cp\u003eOriginally forked from the App Engine webapp framework used by the Python 2.5 runtime, webapp2 includes improved features such as better URI routing, session management, and localization.\u003c/p\u003e\n"],["\u003cp\u003eAlthough webapp2 is an external library and is supported but not maintained by Google, it does not provide any App Engine-specific services, so Python 2.7 apps must use webapp versions of \u003ccode\u003eBlobstoreUploadHandler\u003c/code\u003e and \u003ccode\u003eBlobstoreDownloadHandler\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# The webapp2 Framework\n\n**Note:** This framework is available to Python 2.7\nusers only.\n\nA web application framework can simplify development by taking care of the\ndetails of the interface, letting you focus development effort on your\napplication's features. App Engine includes a simple web application framework\ncalled [webapp2](https://webapp2.readthedocs.io/) - a lightweight\nframework that allows you quickly build simple web applications for the Python\n2.7 runtime.\n\nwebapp2 is compatible with the WSGI standard for Python web applications.\nYou don't have to use webapp2 to write Python applications for App Engine.\nOther web application frameworks, such as [Django](http://www.djangoproject.com/), work with App Engine, and App Engine supports any Python code that\nuses the CGI standard. The webapp2 project, by Rodrigo Moraes, started as a fork\nof the App Engine [webapp](/appengine/docs/legacy/standard/python/tools/webapp)\nframework, which was used by the Python 2.5 runtime. webapp2 includes a number\nof features that make developing web applications easier, such as improved support\nfor URI routing, session management and localization. The Python 2.7 runtime uses\nwebapp2, and the project is maintained externally to App Engine. It is supported,\nbut not maintained, by Google.\n\nFor more information about webapp2, see the\n[official documentation](https://webapp2.readthedocs.io/).\n\nUsing the webapp2 framework in\nPython 2.7\n-----------------------------------------\n\nPython 2.7 applications can use either WSGI or CGI to handle requests, but WSGI\nis generally recommended.\n\nBlobstore and Mail Handlers\n---------------------------\n\nSince it is an external library, webapp2 does not provide any App Engine-specific\nservices. Python 2.7 apps must use the webapp versions of\n`BlobstoreUploadHandler` and `BlobstoreDownloadHandler`.\nSee [webapp\nBlobstore Handlers](/appengine/docs/legacy/standard/python/tools/webapp/blobstorehandlers) for details."]]