Build a Python app on App Engine

Note: If you are deploying a new Python web service to Google Cloud,we recommend getting started withCloud Run.

Use this guide to learn the basics of developing and deploying Pythonweb services to theApp Engine standard environment.

In this guide, you iterate through building and deploying versions of a webservice, starting from a static page and building up to a personalized webpage that shows authenticated users their name, their email, and their recentsite request times.

The following tasks demonstrate the basic developer flow for creatingthat web service usingFirestore in Datastore mode (Datastore) datastorage andFirebase authentication:

  1. Create your Google Cloud project

    Learn how to create a Google Cloud project and then set up theApp Engine resources for your web service.

  2. Write your web service

    Learn how to write and locally test a basic web service, and then definethe configuration files that you need for deploying that web service toApp Engine.

  3. Deploy your web service to App Engine

    Learn how to deploy your Python code and then view your webservice running on App Engine.

  4. Handle Data

    Learn how to use Datastore to store and retrieve data aboutsite requests.

  5. Add Firebase to your web service

    Learn how to addFirebase to yourGoogle Cloud project and web service.

  6. Authenticate users with Firebase

    Learn how to use Firebase Authentication to verify user credentials, serveuser information, and allow data access.

  7. Personalize data for authenticated users

    Learn how to use authentication to personalize data storage and retrievalfor authenticated users.

  8. Clean up

    Learn how to clean up your project and avoid the possibility of incurringcharges for resources you aren't using.

This guide assumes that you are already familiar withPython, theFlask framework, and basic webdevelopment.

Costs

Running this sample app alone does not exceed thefree quotas. You will be charged only if you exceed thosequotas, for example, by running other samples and adding other services to thesame Google Cloud project.

Let's get started!

Create your Google Cloud project and set up the App Engineresources.

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

Last updated 2025-12-15 UTC.