A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/appengine/docs/flexible/python/customizing-the-python-runtime below:

Customizing the Python runtime | Google App Engine flexible environment docs

Customizing the Python runtime

Stay organized with collections Save and categorize content based on your preferences.

You can use custom runtimes to add additional functionality to a Python app running in the flexible environment. To configure a custom runtime, you replace this line in your app.yaml file:

runtime: python

with this line:

runtime: custom

You must also specify a base image by adding a Dockerfile in the same directory that contains the app.yaml file.

Visit the Custom runtimes documentation to learn how to define a Dockerfile in a custom runtime.

Health Checking

By default, all programs running in the flexible environment receive health check requests. If a base image supports health checking, you don't need to write any additional code. If it does not, you will need to disable health checks, or write your own code to handle health check requests.

Selecting the Python version

The python runtime has Python 2.7.12 and Python 3.6.10 pre-installed. You can customize the Dockerfile to install other versions or alternative interpreters if needed.

You can specify a whether to use Python 2 or Python 3 in your application's Dockerfile when creating the virtual environment:

# Python 3
RUN venv /env -p python3.7

# Python 2 (implicit)
RUN virtualenv /env

# Python 2 (explicit)
RUN virtualenv /env -p python2.7

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["Custom runtimes allow adding extra features to Python apps in the flexible environment by replacing `runtime: python` with `runtime: custom` in the `app.yaml` file."],["A Dockerfile must be included in the same directory as the `app.yaml` file to specify a base image when using custom runtimes."],["By default, apps in the flexible environment have health check requests; base images that don't support it must either disable them or implement custom code to handle them."],["The `python` runtime has Python 2.7.12 and Python 3.6.10, but you can install other versions by customizing the `Dockerfile`."],["In your `Dockerfile` you can specify whether to use Python 2 or 3 by adding the corresponding line to your virtual environment."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4