This document describes how to migrate an existing Cloud Endpoints 1.0 app to version 2.0 of the frameworks in Python.
The Cloud Endpoints Frameworks 2.0 for App Engine, was formerly called Cloud Endpoints in version 1.0. This document also describes the migration process for developers wishing to migrate an existing Cloud Endpoints version 1.0 for Python project to the new 2.0 framework. This migration consists of a library change and an app configuration change but no code changes are required.
The new framework brings a number of benefits, including:
- Reduced request latency
- Better integration with App Engine features (such as custom domains)
- New API management features
Endpoints Frameworks 2.0 does not affect the interfaces to your API. Existing clients continue to work after migration without any client-side code changes.
This Beta release contains only a subset of features expected for the general release of Cloud Endpoints Python Framework 2.0. The feature subset includes the following features that are backward compatible with Cloud Endpoints version 1.0:
- JSON-REST protocol, which is used by all Google client libraries.
- Discovery service
- All existing authentication features (OAuth2/OpenID Connect)
- Client library support for generated clients
- API Explorer
The following features are not currently available:
- Traffic splitting
Currently excluded features
The following features are not currently available. If you require any of these, please submit a feature request.
- JSON-RPC protocol, which is required for legacy iOS clients. To create iOS clients for your Endpoints Frameworks v2 API, we recommend that you use Google APIs Objective-C Client Library for REST APIs.
- Automatic ETags
- IDE integration
Migrating from Cloud Endpoints version 1.0
To migrate from version 1.0:
Create a subfolder named
/libin your application main directory (for example,
Invoke the following install command from your application main directory:
pip install -t lib google-endpoints --ignore-installed
Remove the entries
- name: endpointsand
version 1.0from your application
app.yamlfile under the
librariessection. For example:
libraries: - name: endpoints #Remove version: 1.0 #Remove
app.yaml, add the following:
libraries: - name: pycrypto version: 2.6 - name: ssl version: 2.7.11
app.yaml, change the
- url: /_ah/spi/.*to
- url: /_ah/api/.*.
In the root directory of your application, create/modify a file named
appengine_config.pyto include the following:
from google.appengine.ext import vendor vendor.add('lib')
Redeploy your Endpoints application.
Verifying a new deployment
You can verify that the new framework is serving traffic:
- Send some requests to the new deployment.
- Visit the Stackdriver logging page for your project.
View GAE Application Logs
- If requests are shown with having paths beginning with
/_ah/api, then Endpoints Frameworks 2.0 is now serving your API. The logs should not show any requests with paths beginning with
/_ah/spi. These requests indicate that the Cloud Endpoints 1.0 proxy is still serving requests.
Adding Endpoints API Management
The new version of Endpoints adds API management features, including:
- API key management
- API sharing
- User authentication
- API metrics
- API logs
To get started, navigate to the Endpoints Frameworks for App Engine Python page.