def get(id): try: return str(Foo.get(id)) except Exception, e: print e
def create(): try: new_foo = Foo.create(random.randrange(0,100)) return "Created successfully! \n" + str(new_foo) except Exception, e: print e