> For the complete documentation index, see [llms.txt](https://repo.4pfsec.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://repo.4pfsec.com/google-cloud-computing/cloud-computing-fundamentals/app-engine-qwik-start-python.md).

# App Engine: Qwik Start - Python

LAB 3

## Overview

App Engine allows developers to focus on doing what they do best, writing code. The App Engine standard environment is based on container instances running on Google's infrastructure. Containers are preconfigured with one of several available runtimes (Java 7, Java 8, Python 2.7, Go and PHP). Each runtime also includes libraries that support [App Engine Standard APIs](https://cloud.google.com/appengine/docs/about-the-standard-environment#index_of_features). For many applications, the standard environment runtimes and libraries might be all you need.

## Lab

### Enable Google App Engine Admin API

To begin, enable the App Engine Admin API under `APIs & Services`.

![](https://561482365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdOcy1ba9EGn2GQ7ELK%2Fuploads%2FdwnOXSUyEyylDhkcSpcS%2Fimage.png?alt=media\&token=6eb07779-7054-4082-8d96-828d13244611)

### Download the Hello World app <a href="#step5" id="step5"></a>

Enter the following command to clone the hello world app

```
git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git
```

![](https://561482365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdOcy1ba9EGn2GQ7ELK%2Fuploads%2FHotmUcY61rL6mMWa9IOZ%2Fimage.png?alt=media\&token=f94e13f0-2e53-4e09-aa4c-c804a1e37476)

### Test the application <a href="#step6" id="step6"></a>

Now that the application is on the system, change to its directory and run it as shown below

```
cd python-docs-samples/appengine/standard_python3/hello_world
dev_appserver.py app.yaml
```

![](https://561482365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdOcy1ba9EGn2GQ7ELK%2Fuploads%2Fh0wnB2U9fw3jxfPxzHs1%2Fimage.png?alt=media\&token=23b2b53d-838e-41c0-bf34-794d036b8d7d)

Now that the app is up and running, view it on port 8080 as shown below.

![](https://561482365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdOcy1ba9EGn2GQ7ELK%2Fuploads%2FHolHf4FaVqJ9CIlEFmQG%2Fimage.png?alt=media\&token=c90050ef-672c-4763-8e13-81271a55f024)

![](https://561482365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdOcy1ba9EGn2GQ7ELK%2Fuploads%2FrJXxY3tg1SGlf0NwY5Mw%2Fimage.png?alt=media\&token=48324943-1b55-4f2b-be4b-23947531437c)

### Modify Application

Modify the application and make it return something else.

```
cd python-docs-samples/appengine/standard_python3/hello_world
nano main.py
```

![](https://561482365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdOcy1ba9EGn2GQ7ELK%2Fuploads%2FvjAYxRiOSneU0ZPWO2dF%2Fimage.png?alt=media\&token=7648b025-45db-48da-bc29-695e350de9e9)

Once completed, head back to the site and preview the change.

![](https://561482365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdOcy1ba9EGn2GQ7ELK%2Fuploads%2FZGNo1Wmpapre15YJlLr5%2Fimage.png?alt=media\&token=04378476-299a-49b9-ae2f-e50a0984e3f0)

### Deploying Application

Now that we are happy with the changes, we can deploy the app to gcloud without much struggle as shown below.

The following command has to be run in the same directory where the `app.yaml` file exists.

```
gcloud app deploy
```

![](https://561482365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdOcy1ba9EGn2GQ7ELK%2Fuploads%2FJZ0OcxQjSLuewqjyU5kq%2Fimage.png?alt=media\&token=69ff6763-1bf6-465a-bd56-8c2b4340dc62)

![](https://561482365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdOcy1ba9EGn2GQ7ELK%2Fuploads%2FM5VNFY4fK7rfZP7ZEByC%2Fimage.png?alt=media\&token=6c009b54-a86c-457b-b043-6986f4080401)

### Viewing your Application

Now that its all complete, we can view our application with the following command

```
gcloud app browse
```

![](https://561482365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdOcy1ba9EGn2GQ7ELK%2Fuploads%2FKR1IF7JUlYSweVpZLhbQ%2Fimage.png?alt=media\&token=29755f7e-619c-4578-b5e4-21d9c8de61a9)

![](https://561482365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdOcy1ba9EGn2GQ7ELK%2Fuploads%2FiNx6O0He8GVsPg14lRGE%2Fimage.png?alt=media\&token=7a0ed27c-98d7-4017-a3c7-1afe23d90f5d)
