diff --git a/appengine/standard/endpoints-frameworks-v2/echo/README.md b/appengine/standard/endpoints-frameworks-v2/echo/README.md index d8519f307f5..f9ddeecddd6 100644 --- a/appengine/standard/endpoints-frameworks-v2/echo/README.md +++ b/appengine/standard/endpoints-frameworks-v2/echo/README.md @@ -4,11 +4,8 @@ This demonstrates how to use Google Cloud Endpoints Frameworks v2 on Google App ## Setup -Create a `lib` directory in which to install the Endpoints Frameworks v2 library. For more info, see [Installing a library](https://cloud.google.com/appengine/docs/python/tools/using-libraries-python-27#installing_a_library). - Install the Endpoints Frameworks v2 library: - $ mkdir lib $ pip install -t lib google-endpoints ## Running Locally @@ -27,7 +24,7 @@ Generate a swagger file by running: `python lib/endpoints/endpointscfg.py get_sw To set up OAuth2, replace `your-oauth-client-id.com` under `audiences` in the annotation for `get_user_email` with your OAuth2 client ID. If you want to use Google OAuth2 Playground, use `407408718192.apps.googleusercontent.com` as your audience. To generate a JWT, go to the following address: `https://developers.google.com/oauthplayground`. -Deploy the generated swagger spec to Google Cloud Service Management: `gcloud alpha service-management deploy echo-v1_swagger.json` +Deploy the generated swagger spec to Google Cloud Service Management: `gcloud beta service-management deploy echo-v1_swagger.json` Open the `app.yaml` file and in the `env_variables` section, replace `your-service.appspot.com` with your service name, and `2016-08-01r0` with your uploaded service management configuration. diff --git a/appengine/standard/endpoints-frameworks-v2/echo/appengine_config.py b/appengine/standard/endpoints-frameworks-v2/echo/appengine_config.py index 3bb4ea6e3f1..402f8065db3 100644 --- a/appengine/standard/endpoints-frameworks-v2/echo/appengine_config.py +++ b/appengine/standard/endpoints-frameworks-v2/echo/appengine_config.py @@ -1,4 +1,10 @@ from google.appengine.ext import vendor +import pkg_resources # Add any libraries installed in the `lib` folder. vendor.add('lib') + +# The Python runtime declares a "google" package, but so does +# google-endpoints-api-management. Therefore the "google" package must behave +# as a namespace package, otherwise one import or another will fail. +pkg_resources.declare_namespace('google')