ospackage to achieve this:
Get the current city of a user:
Get the current country of a user (Will return a ISO 3166-1 alpha-2 country code):
Note: If App Engine fails to supply a city name or country code, the output will be the second argument supplied to the
os.environ.get()function call.
Update 13 Oct 2015: Added a Demo link
Update 7 Nov 2015: Added complete source code.