points.ensure_index([('loc', pymongo.GEOSPHERE)])
points.insert({'loc': {'type': 'Point', 'coordinates': [40, 5]}})
for doc in points.find({'loc': SON([('$near', {'$geometry': SON([('type',
    'Point'), ('coordinates', [40, 5])])}), ('$maxDistance', 10)])}):
    doc
Does anyone know a working example of 2dsphere index in pymongo?