Creating a Guestbook Application

This tutorial shows you how to build and run a sample Python application for App Engine and provides a code walkthrough of the sample code. The sample is a simple guestbook that lets users post messages to a public message board.


  • Build and test an App Engine app using Python.
  • Integrate your application with Google Accounts for user authentication.
  • Use the webapp2 framework.
  • Use Jinja2 templates.
  • Store data in Google Cloud Datastore.
  • Deploy your app to App Engine.


App Engine has generous free quotas that will cover your testing this tutorial in a live production environment.

Before you begin

  1. Install Python 2.7.
  2. Create a new Cloud Platform Console project or retrieve the project ID of an existing project from the Google Cloud Platform Console:

    Go to the Projects page

    Tip: Retrieve a list of your existing project IDs with gcloud.

  3. Install and then initialize the Google Cloud SDK.

Cloning the project from GitHub

  1. Clone the Guestbook application repository to your local machine:

    git clone

  2. Go to the directory that contains the sample code:

    cd appengine-guestbook-python

Building and running locally

To build and run the sample locally:

  1. Start the local development web server by running the following command from the appengine-guestbook-python directory: ./

    The development web server runs, listening for requests on port 8080.

  2. Visit http://localhost:8080/ in your web browser to view the app.

    Click Login, then sign in with any email address. The development server accepts any email you supply, valid or not. This same code requires a valid Google Account and email when deployed to production.

  3. Stop the development server by pressing Control+C.

Send feedback about...

App Engine standard environment for Python