By Markus Sprunck; Revision: 1.0; Status: final; Last Content Change: May 3, 2013;
In the following article the use of OAuth2 in a Google AppEngine Python application to get user information like name, gender, picture, nickname, e-mail is described.
The following example application http://oaae-sample-python.appspot.com/ demonstrates the implementation of login and display the name and picture of Google account at the right top corner of the window.
This small Google AppEngine application implements the same functionality and almost the same UI as the GWT & Java implementation http://oaae-sample.appspot.com/. So, you may directly compare the difference between Python and Java & GWT for Google AppEngine.
In picture 1 the name of the logged on user name and profile picture have been marked in red.
The full code and used libraries are stored on GitHub (see link below).
// File #01: main.py
// File #02: app.yaml
// File #03: main.html
// File #04: response.html
Test Expected Result
1) Press sign in link in the top dark bar.
2) Agree access. You can withdraw the access rights in Google Dashboard (see link below).
3) The name and picture should appear at the right top corner. Now you may press the Send button to send a message to the server.
4) Press Back button to return to main page
1) Google AppEngine;
2) Google Dashboard (Authorized Access to your Google Account); http://www.google.com/dashboard3) Using OAuth 2.0 to Access Google APIs; http://developers.google.com/accounts/docs/OAuth2
4) Google AppEngine (Sign up); http://developers.google.com/appengine
5) Google APIs; http://code.google.com/apis/console