Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



Required Files and Configuration

  1. The backend API class file
  2. The API server file (Optional)
  3. app.yaml
Your project must contain, at a minimum, the following files:
File and Location Description
/src/<your_api_class>.py The class file (or files, if you implement your API across multiple classes) containing your backend API.
/src/<your_api_server>.py Optional file containing your API server code, if you don't include it inside your API class.
/src/app.yaml The web app deployment descriptor required for App Engine configuration.

The contents of each of these required files is documented in the following sections.

The backend API class file

The required and optional contents of the class file (or files, if you use a multi-class API ) are fully described in the topic Creating an Endpoints API .

The API server file (Optional)

This file and its contents are fully described under Creating an API server .

app.yaml

The bare minimum contents required for this file are as follows:

application: your-app-id
version: version_number
runtime: python27
threadsafe: true
api_version: 1

handlers:
# Endpoints handler
- url: /_ah/spi/.*
  script: helloworld_api.APPLICATION

libraries:
- name: pycrypto
  version: latest
- name: endpoints
  version: 1.0

where:

  • your-app-id is replaced with the actual App Engine application ID for your backend API
  • version_number is replaced by the App Engine version number you want to use, with the first version of your app starting at version 1 . (For a full discussion of App Engine versions, see Deploying to multiple app versions .)
  • helloworld_api is replaced with the name of your own backend API module.
  • threadsafe is set to true if you want App Engine to send multiple requests in parallel, or set to false, if you want App Engine to send requests serially.

Additional but optional settings are available. See Python Application Configuration with app.yaml for more information. However, note that the information under Requiring login or administrator status and Secure URLs do not apply to backend APIs.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.