A Python 3 app in App Engine is configured using a file
app.yaml. The file defines runtimes, handlers, scaling, and other general
settings including environment variables.
You specify the runtime configuration for your Python 3 app in a
.yaml file. Currently
for your deployment to succeed this file must be named
app.yaml but a future update will
allow you to use a custom name, for example
app.yaml file acts as a descriptor for the deployment of a version of a service. You must first create the
app.yaml file for the
default service of your app before you can create and deploy
app.yaml files for additional services.
You can use a unique name for your
app.yaml files, but then you must
specify the file name with the deployment
as well. For example, if you name your
app.standard.yaml, then you must deploy your app using either:
gcloud app deploy service-name-app.yaml gcloud app deploy app.standard.yaml
To learn more about structuring multiple services and
app.yaml files in your
app, see Structuring Web Services.
app.yaml file requires only the
runtime element for a simple
Python 3 app in the standard environment, like:
runtime: python38 # or python37 for Python 3.7
The syntax of the
app.yaml file is in the YAML format.
All configuration elements
For a complete list of all the supported elements in this configuration file, see the app.yaml reference.