def make_coffee(name='Unknown'): user = User.get(1) coffee = '''A special coffee for you {}, it was made by {}, enjoy it!!! ( ) ( ___...(-------)-....___ .-"" ) ( ""-. .-'``'|-._ ) _.-| / .--.| `""---...........---""` | / / | | | | | | \ \ | | `\ `\ | | `\ `| | _/ /\ / (__/ \ / _..---""` \ /`""---.._ .-' \ / '-. : `-.__ __.-' : : ) ""---...---"" ( : '._ `"--...___...--"` _.' \""--..__ __..--""/ '._ """----.....______.....----""" _.' `""--..,,_____ _____,,..--""` `"""----"""` '''.format(name, user.name) print(coffee)
def get(self, id=None): try: if id is None: return self.__query({}) return make_response(jsonify(User.get(id).as_dict())) except Exception as e: print(e) response_object = { 'status': 'fail', 'message': 'Try again, detlais: {}'.format(str(e)) } return make_response(jsonify(response_object), 500)
def make_capuccino(name='Unknown'): user = User.get(1) sleep(15) coffee = """A special capuccino for you {}, it was made by {}, sorry for the delay!!! ) ( ( ) ( ,o(__Oo, O,_()_(_)o, ( _),(o_),_) _|`--------(_) (C| |__ /` `\ / `\` \ `========` / `'---------------' """.format(name, user.name) print(coffee)