Environnement logiciel webapp
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Remarque : Ce cadre est uniquement disponible pour les utilisateurs de Python 2.7.
Un environnement logiciel d'applications Web peut simplifier le développement par la gestion des détails de l'interface, ce qui vous permet de concentrer vos efforts sur les fonctionnalités de vos applications. App Engine inclut un cadre d'application Web simple appelé webapp2, un cadre léger qui vous permet de créer rapidement des applications Web simples pour l'exécution de Python 2.7.
webapp2 est compatible avec le standard WSGI pour les applications Web Python.
Il n'est pas nécessaire d'utiliser webapp pour rédiger des applications Python pour App Engine.
D'autres infrastructures d'applications Web, telles que Django, fonctionnent avec App Engine et App Engine prend en charge tout code Python utilisant le standard CGI. Le projet webapp2, de Rodrigo Moraes, a commencé comme un fork du framework webapp d'App Engine, qui était utilisé par le moteur d'exécution Python 2.5. webapp2 inclut un certain nombre de fonctionnalités facilitant le développement d'applications Web, telles que l'amélioration de la prise en charge du routage URI, la gestion de session et la localisation. Le moteur d'exécution Python 2.7 utilise webapp2 et le projet est géré en externe dans App Engine. Il est pris en charge mais n'est pas maintenu par Google.
Pour plus d'informations sur webapp2, voir la documentation officielle.
Utiliser le framework webapp2 dans Python 2.7
Les applications Python 2.7 peuvent utiliser WSGI ou CGI pour traiter les demandes, mais WSGI est généralement recommandé.
Blobstore et gestionnaires de courrier
Comme il s'agit d'une bibliothèque externe, webapp2 ne fournit aucun service spécifique à App Engine. Les applications Python 2.7 doivent utiliser les versions webapp de BlobstoreUploadHandler
et BlobstoreDownloadHandler
.
Pour en savoir plus, consultez la page Gestionnaires Blobstore d'applications Web.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (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."]]