Python 2.7 ha raggiunto la fine del supporto
e verrà
ritirato
il 31 gennaio 2026. Dopo il ritiro, non potrai eseguire il deployment di applicazioni Python 2.7, anche se la tua organizzazione ha utilizzato in precedenza un criterio dell'organizzazione per riattivare i deployment di runtime legacy. Le tue applicazioni Python 2.7 esistenti continueranno a essere eseguite e a ricevere traffico dopo la
data di ritiro. Ti consigliamo di
eseguire la migrazione all'ultima versione supportata di Python.
Il framework webapp2
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Nota:questo framework è disponibile solo per gli utenti di Python 2.7.
Un framework per applicazioni web può semplificare lo sviluppo occupandosi dei dettagli dell'interfaccia, consentendoti di concentrarti sulle funzionalità della tua applicazione. App Engine include un semplice framework per applicazioni web chiamato webapp2, un framework leggero che consente di creare rapidamente applicazioni web semplici per l'ambiente di runtime Python 2.7.
webapp2 è compatibile con lo standard WSGI per le applicazioni web Python.
Non è necessario utilizzare webapp2 per scrivere applicazioni Python per App Engine.
Altri framework per applicazioni web, come
Django, funzionano con App Engine, che supporta qualsiasi codice Python che
utilizzi lo standard CGI. Il progetto webapp2, di Rodrigo Moraes, è nato come fork del framework webapp di App Engine, utilizzato dal runtime Python 2.5. webapp2 include una serie di funzionalità che semplificano lo sviluppo di applicazioni web, ad esempio un supporto migliorato per il routing degli URI, la gestione delle sessioni e la localizzazione. Il runtime Python 2.7 utilizza webapp2 e il progetto viene gestito esternamente ad App Engine. È supportato, ma non gestito, da Google.
Per ulteriori informazioni su webapp2, consulta la documentazione ufficiale.
Utilizzo del framework webapp2 in
Python 2.7
Le applicazioni Python 2.7 possono utilizzare WSGI o CGI per gestire le richieste, ma in genere è consigliato WSGI.
Gestori di Blobstore e posta
Poiché è una libreria esterna, webapp2 non fornisce servizi specifici per App Engine. Le app Python 2.7 devono utilizzare le versioni web di BlobstoreUploadHandler
e BlobstoreDownloadHandler
.
Per maggiori dettagli, consulta Gestione degli elementi Blobstore per le app web.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-09-04 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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."]]