Think on having a dbmodel to store that locations, like the following:
# model definition
class Poi(db.Model):
name = db.StringProperty()
lat = db.FloatProperty()
lon = db.FloatProperty()
geohash = db.StringProperty()
Geohash is a string built from longitude and latitude values that can
be used as a geographical index, and to perform proximity queries, and
sort of bbox queries. The following is a sample bbox query based on
geohash properties:
# query code
southwest = str(Geohash((minlon,minlat)))
northeast = str(Geohash((maxlon,maxlat)))
q = db.GqlQuery("SELECT * FROM Poi " +
"WHERE geohash > :1 AND geohash <= :2 " +
"ORDER BY geohash DESC",
southwest, northeast)
That can get more complicated if your bbox crosses the equator or the
-180º meridian, even in other cases as I heard, and you also might
have to filter false positives -data returned by the query that falls
out the bbox-, but it's a beginning.
I describe my approach here:
http://public.grupoinnovant.com/blog/?p=23
Other interesting references:
http://labs.metacarta.com/blog/27.entry/
http://mappinghacks.com/code/geohash.py.txt
http://en.wikipedia.org/wiki/Geohash
http://catherinedevlin.blogspot.com/2008/09/bigtable-blues.html