ospackage in Google App Engine to obtain some useful information for the request. As mentioned, we can obtain user geolocation of a user. Actually, there is a lot more we can do with it.
A LIVE DEMO is available. The demo contains a full list of
os.environkeys and their corresponding values. Some values are not publicly disclosed, but you can try it in your own application.
The values are accessed with
os.environ[key]with
keyvalue available, such as
HTTP_USER_AGENTand
REMOTE_ADDR. However, some of the App Engine-specific keys such as
USER_EMAILand
HTTP_X_APPENGINE_COUNTRY, only exist in the GAE environment.
The following section comes with the complete source code.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.