Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Cloud Endpoints Frameworks è un framework
web per gli ambienti di runtime
Python 2.7 e Java 8 standard di App Engine.
Cloud Endpoints Frameworks fornisce gli strumenti e le librerie che ti consentono di
generare API REST e librerie client per la tua applicazione.
Come altri framework web, Endpoints Frameworks gestisce i dettagli di comunicazione di basso livello delle richieste e delle risposte HTTP per la tua applicazione. Quando
un client invia una richiesta alla tua API, Endpoints Frameworks indirizza l'URL
della richiesta alla funzione o al metodo nel tuo codice che elabora la richiesta.
Endpoints Frameworks converte il valore restituito in JSON e invia la
risposta. Aggiungi i metadati (utilizzando le annotazioni in Java e i decoratori in
Python) al codice sorgente. I metadati definiscono la
superficie delle API REST per la tua
applicazione.
Nel codice di esempio, le
annotazioni iniziano con
il carattere @.
Python
@endpoints.method(# This method takes a ResourceContainer defined above.ECHO_RESOURCE,# This method returns an Echo message.EchoResponse,path="echo",http_method="POST",name="echo",)defecho(self,request):output_message=" ".join([request.message]*request.n)returnEchoResponse(message=output_message)
Nel codice di esempio, i
decoratori iniziano con
il carattere @.
Con Endpoints Frameworks, non devi eseguire il deployment di un server web di terze parti (come Apache Tomcat o Gunicorn) con la tua applicazione. Annota
o decora il codice ed esegui il deployment dell'applicazione come faresti normalmente nell'ambiente standard di App Engine.
Gestione delle API
Extensible Service Proxy (ESP) fornisce funzionalità di gestione API per Endpoints per OpenAPI ed Endpoints per gRPC. ESP viene eseguito in un container
insieme a ogni istanza del backend.
Poiché l'ambiente standard di App Engine non supportava
i deployment multi-container durante lo sviluppo di
Endpoints Frameworks, quest'ultimo non utilizza
ESP. Al contrario, Endpoints Frameworks include un gateway API integrato che fornisce funzionalità di gestione API paragonabili a quelle fornite da ESP per Endpoints per OpenAPI ed Endpoints per gRPC.
Endpoints Frameworks intercetta tutte le richieste ed esegue tutti i controlli necessari (ad esempio l'autenticazione) prima di inoltrare la richiesta al backend API. Quando il backend risponde, Endpoints Frameworks raccoglie
e segnala la telemetria. Puoi visualizzare le metriche per la tua API nella pagina Servizi
Endpoints della console Google Cloud .
Puoi utilizzare Endpoints Frameworks con o senza la funzionalità di gestione delle API. L'utilizzo di Endpoints Frameworks senza la funzionalità di gestione delle API
è offerto senza costi. La funzionalità di gestione API viene addebitata
in base alla pagina dei prezzi di
Endpoints.
Limitazioni
Endpoints Frameworks è supportato solo negli ambienti di runtime standard Python 2.7 e Java 8 di App Engine.
Endpoints Frameworks non supporta gli ambienti di runtime Node.js, PHP e Go
nell'ambiente standard di App Engine.
Endpoints Frameworks non supporta l'ambiente flessibile di App Engine.
Endpoints Frameworks non supporta le funzioni Cloud Run,
Compute Engine e Google Kubernetes Engine.
[[["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-08 UTC."],[[["\u003cp\u003eCloud Endpoints Frameworks is a web framework designed for the App Engine standard Python 2.7 and Java 8 runtime environments, allowing you to generate REST APIs and client libraries.\u003c/p\u003e\n"],["\u003cp\u003eEndpoints Frameworks handles HTTP requests and responses, routing URLs to the appropriate code functions and converting return values to JSON, simplifying API development.\u003c/p\u003e\n"],["\u003cp\u003eUsing annotations in Java and decorators in Python, Endpoints Frameworks lets you define the surface of REST APIs directly within your code without the need for a third-party web server.\u003c/p\u003e\n"],["\u003cp\u003eWhile not using the Extensible Service Proxy (ESP), Endpoints Frameworks provides built-in API management comparable to ESP, including request interception, authentication, and telemetry reporting.\u003c/p\u003e\n"],["\u003cp\u003eEndpoints Frameworks is limited to the App Engine standard Python 2.7 and Java 8 environments and does not support Node.js, PHP, Go, the App Engine flexible environment, Cloud Run, Compute Engine, or Google Kubernetes Engine.\u003c/p\u003e\n"]]],[],null,["# Cloud Endpoints Frameworks is a [web\nframework](https://wikipedia.org/wiki/Web_framework) for the App Engine\nstandard [Python 2.7 and Java 8 runtime\nenvironments](/appengine/docs/standard/runtimes).\nCloud Endpoints Frameworks provides the tools and libraries that allow you to\ngenerate REST APIs and client libraries for your application.\n| **Note:** Endpoints Frameworks doesn't support the PHP, Go, or Node.js runtimes.\n\nLike other web frameworks, Endpoints Frameworks handles the low-level\ncommunication details of HTTP requests and responses for your application. When\na client sends a request to your API, Endpoints Frameworks routes the\nrequest's URL to the function or method in your code that processes the request.\nEndpoints Frameworks converts the return value to JSON and sends the\nresponse. You add metadata (by using annotations in Java and decorators in\nPython) to your source code. The metadata defines the\n[surface](/endpoints/docs/frameworks/glossary#surface) of the REST APIs for your\napplication. \n\n### Java\n\n @ApiMethod(name = \"echo\")\n public Message echo(Message message, @Named(\"n\") @Nullable Integer n) {\n return doEcho(message, n);\n }\n\nIn the example code, the\n[annotations](/endpoints/docs/frameworks/java/annotate-code) begin with\nthe `@` character.\n\n### Python\n\n @endpoints.method(\n # This method takes a ResourceContainer defined above.\n ECHO_RESOURCE,\n # This method returns an Echo message.\n EchoResponse,\n path=\"echo\",\n http_method=\"POST\",\n name=\"echo\",\n )\n def echo(self, request):\n output_message = \" \".join([request.message] * request.n)\n return EchoResponse(message=output_message)\n\nIn the example code, the\n[decorators](/endpoints/docs/frameworks/python/create_api) begin with\nthe `@` character.\n\nWith Endpoints Frameworks, you don't have to deploy a third-party web\nserver (such as Apache Tomcat or Gunicorn) with your application. You annotate\nor decorate the code and deploy your application as you normally would to the\n[App Engine standard environment](/appengine/docs/standard).\n\nAPI management\n--------------\n\nThe [Extensible Service Proxy\n(ESP)](/endpoints/docs/frameworks/glossary#extensible_service_proxy)\nprovides API management features for Endpoints for OpenAPI and\nEndpoints for gRPC. ESP runs in a container\nalongside each instance of your backend.\n\n\nBecause the App Engine standard environment didn't support\nmulti-container deployments when Endpoints Frameworks was\nunder development, Endpoints Frameworks doesn't use\nESP. Instead, Endpoints Frameworks includes a built-in\n[API gateway](https://wikipedia.org/wiki/API_management)\nthat provides API management features that are comparable to the\nfeatures that ESP provides for Endpoints for OpenAPI and\nEndpoints for gRPC.\n\n\u003cbr /\u003e\n\nEndpoints Frameworks intercepts all requests and performs any\nnecessary checks (such as authentication) before forwarding the request to the\nAPI backend. When the backend responds, Endpoints Frameworks gathers\nand reports telemetry. You can view metrics for your API on the **Endpoints\nServices** page in the Google Cloud console.\n\nYou can use Endpoints Frameworks with or without API management\nfunctionality. Use of Endpoints Frameworks without API management\nfunctionality is offered at no charge. API management functionality is charged\naccording to the [Endpoints pricing\npage](/endpoints/pricing).\n\nLimitations\n-----------\n\n- Endpoints Frameworks is supported only on the App Engine standard Python 2.7 and Java 8 runtime environments.\n- Endpoints Frameworks doesn't support the Node.js, PHP, and Go runtime environments on the App Engine standard environment.\n- Endpoints Frameworks doesn't support the App Engine flexible environment.\n- Endpoints Frameworks doesn't support Cloud Run functions, Compute Engine, and Google Kubernetes Engine.\n\nWhat's next\n-----------\n\n- To learn more about the differences between ESP and\n Endpoints Frameworks, see [Comparing Extensible Service Proxy and\n Endpoints Frameworks](/endpoints/docs/frameworks/frameworks-extensible-service-proxy#endpoints_frameworks).\n\n- For information on the language-specific libraries and tools, see the following:\n\n - [About Endpoints Frameworks for\n Java](/endpoints/docs/frameworks/java/about-cloud-endpoints-frameworks)\n - [About Endpoints Frameworks for\n Python](/endpoints/docs/frameworks/python/about-cloud-endpoints-frameworks)\n- To learn how to configure, deploy, and send requests to a sample API, see the\n following:\n\n - [Getting started with Endpoints Frameworks for Java](/endpoints/docs/frameworks/java/get-started-frameworks-java)\n - [Getting started with Endpoints Frameworks for Python](/endpoints/docs/frameworks/python/get-started-frameworks-python)"]]