Deploy a sample Python 3 web application on Google Cloud AppEngine in 5 minutes. See App Engine Quickstart for reference.


Open the cloud shell on Google Cloud Console and run the following commands:

๐Ÿ‘‰ cd

๐Ÿ‘‰ gcloud app create

๐Ÿ‘‰ git clone

๐Ÿ‘‰ cd ~/python-docs-samples/appengine/standard_python3/hello_world
๐Ÿ‘‰ (optional) cloudshell workspace ~/python-docs-samples/appengine/standard_python3/hello_world

๐Ÿ‘‰ virtualenv --python python3 ~/envs/hello_world
๐Ÿ‘‰ pip3 install -r requirements.txt
๐Ÿ‘‰ python3
    * Serving Flask app 'main' (lazy loading)
    * Environment: production
      WARNING: This is a development server. Do not use it in a production deployment.
      Use a production WSGI server instead.
    * Debug mode: on
    * Running on (Press CTRL+C to quit)
    * Restarting with stat
    * Debugger is active!
    * Debugger PIN: 111-142-068

๐Ÿ‘‰ (optional) click on the Web Preview button on cloud shell to open a new browser window to see the hello world app

๐Ÿ‘‰ gcloud app deploy
    Services to deploy:
    descriptor:                  [/home/david/python-docs-samples/appengine/standard_python3/hello_world/app.yaml]
    source:                      [/home/david/python-docs-samples/appengine/standard_python3/hello_world]
    target project:              [********]
    target service:              [default]
    target version:              [202107********]
    target url:                  [https://********]
    target service account:      [App Engine default service account]

    Do you want to continue (Y/n)?  y

    Beginning deployment of service [default]...
    Created .gcloudignore file. See `gcloud topic gcloudignore` for details.
    โ• โ• Uploading 6 files to Google Cloud Storage                โ•โ•ฃ
    File upload done.
    Updating service [default]...done.
    Setting traffic split for service [default]...done.
    Deployed service [default] to [https://********]

    You can stream logs from the command line by running:
    $ gcloud app logs tail -s default

    To view your application in the web browser run:
    $ gcloud app browse

By default, the new application is publicly accessible.

There are many ways to protect web applications from unauthorized access. On Google Cloud, BeyondCorp Enterprise is an enterprise scale zero trust platform that enables customers to define fine-grained access level policies leveraging security signals from a variety of data sources including device, user identity profile, network and third-party security solution.