you're welcome :)

By the way, the library does not work with IPv6 and Google AppEngine
supports IPv6,
so be prepared to get some of those requests...

The library just returns *None *in this case... unless you downloaded it 2
minutes ago,
when it still threw an IpParseError exception ;)

-Andrin

On Thu, Feb 3, 2011 at 5:19 PM, Nickolas Daskalou <[email protected]> wrote:

> +1. Looks like it will come in handy! Thanks Andrin.
>
> Nick
>
>
> On 4 February 2011 02:12, Uros Trebec <[email protected]> wrote:
>
>> Thank you for this, very much appreciated! :)
>>
>> Regards,
>> Uros
>>
>> On Feb 3, 3:32 pm, Andrin von Rechenberg <[email protected]> wrote:
>> > Hey there
>> >
>> > I just created an AppEngine python library to map an IP address to a
>> country
>> > code.
>> >
>> > This is how you will be able to use the libary after you downloaded it
>> from:http://www.vonrechenberg.ch/blog/geoip.zip
>> >
>> > *
>> >
>> > import geoip
>> > class YourHandler(webapp.RequestHandler):
>> >   def get(self):
>> >     (country_code, country_name) = geoip.query(self.request.remote_addr)
>> >     self.response.out.write("You are from %s(%s)" %
>> >                             (country_name, country_code))
>> >
>> > *
>> >
>> > It's a very quick way to lookup an ip address locally without doing any
>> API
>> > calls.
>> >
>> > For more details on the implementation see:
>> http://devblog.miumeet.com/2011/02/geoip-on-appengine-how-to-map-ip.html
>> >
>> > Cheers,
>> > -Andrin
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<google-appengine%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to