id = None
while None == id or Session.get_by_id(id):
    id = random.randrange(sys.maxsize)
seshKey = db.Key.from_path('Session', id)
session = Session(key=seshKey)
How to implement simple sessions for Google App Engine?