Migrating to Cloud Endpoints Frameworks 2.0 for App Engine

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)
  • Official support for App Engine Flexible Environment
  • 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.

Feature overview

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
  • CORS (for JavaScript callers not using Google JavaScript client library)
  • API Explorer

The following features are not currently available:

  • App Engine custom domains
  • Traffic splitting

Currently excluded features

The following features are not currently available:

  • JSON-RPC protocol
  • Automatic ETags
  • Automatic kind fields
  • IDE integration
  • fields partial responses

Migrating from Cloud Endpoints version 1.0

To migrate from version 1.0:

  1. Create a subfolder named /lib in your application main directory (for example, /my-app./lib/).

  2. Invoke the following install command from your application main directory:

     pip install -t lib google-endpoints --ignore-installed
  3. Remove the entries - name: endpoints and version 1.0 from your application app.yaml file under the libraries section. For example:

    - name: endpoints   #Remove
      version: 1.0      #Remove
  4. In the handlers section in app.yaml, change the url directive from - url: /_ah/spi/.* to - url: /_ah/api/.*.

  5. In the root directory of your application, create/modify a file named appengine_config.py to include the following:

    from google.appengine.ext import vendor
  6. Redeploy your Endpoints application.

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.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Cloud Endpoints Frameworks for App Engine