The app.yaml file

An example yaml file:

application: some-app-name
version: 1
runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /static
  static_dir: static

- url: /.*
  script: blog.app

libraries:
- name: jinja2
  version: latest

- name: PIL
  version: "1.1.7"

Use the name of the application already registered on App Engine:

application: some-app-name

This is a unique name that identifies your application among all the other other web apps running on appspot.com.

version: 1
runtime: python27

Without the runtime line, App Engine does not know that your application is running Python.

api_version: 1
threadsafe: true

You can set threadsafe to false, but it is generally considered good practice to make it true.

handlers:
- url: /static
  static_dir: static

The url matches the path of an incoming request and the static_dir matches a static directory on your web server. The two path names do not have to be the same.

- url: /.*
  script: blog.app

Note that the order in which these handlers appear matters. If /.* came first in the list, it would match all incoming requests, including /static.

libraries:
- name: jinja2
  version: latest

- name: PIL
  version: "1.1.7"

Any libraries that you import into your application file and are not part of the standard distribution will need to be added here.