from API import app if __name__ == '__main__': app.run()
from API import app if __name__ == '__main__': app.run(debug=True)
from API import app app.run( host='0.0.0.0', port=80, debug=True, )
# from dotenv import load_dotenv # load_dotenv() try: from API import (app, api, Embeddings) except Exception as e: print("Modules are Missing : {} ".format(e)) api.add_resource(Embeddings, '/embedding') if __name__ == '__main__': app.run(debug='0.0.0.0')
#!./.ENV/bin/python __author__ = 'atomikin' from API import app if __name__ == '__main__': app.run(debug=True)
# Allows us to run API locally, although it is still making connections to the remote MySQL server. from API import app app.debug = True app.run()
@app.route('/temp') def get_temp(): command_queue.put({"url": "/temp", "body": 0}) return Response(json.dumps({"data": str(get_for("/temp", response_queue, 5))}, default=json_util.default), mimetype='application/json') @app.route('/temps') def get_temps(): return Response(json.dumps({"data": TempLog.get_all_dic()}, default=json_util.default), mimetype='application/json') @app.route('/stop') @logged_in_route def stop(): func = request.environ.get('werkzeug.server.shutdown') if func is None: raise RuntimeError('Not running with the Werkzeug Server') func() return "shutting down" if not app.debug or True: import logging file_handler = logging.FileHandler("log.txt") file_handler.setLevel(logging.DEBUG) app.logger.addHandler(file_handler) start_backend() app.run(host='0.0.0.0', debug=True) Pin.cleanup()
from API import app app.run(host='0.0.0.0', port=1300, debug=True)
try: from API import (app, api, Controller, HouseLookupController) except Exception as e: print("Modules are Missing : {} ".format(e)) api.add_resource(Controller, '/houseprice') api.add_resource(HouseLookupController, '/houselookup') if __name__ == '__main__': app.run(host='0.0.0.0', threaded=True)
from API import app app.run("0.0.0.0", port=80)
import API from API import app app.run(port='5002') ##ssl_context='adhoc'
def schedule_api(self): """开启 API""" app.run()
from API import app app.run(host='127.0.0.1', port=80, debug=True)
""" This script runs the API1 application using a development server. """ from os import environ from API import app if __name__ == '__main__': HOST = environ.get('SERVER_HOST', 'localhost') try: PORT = int(environ.get('SERVER_PORT', '5245')) except ValueError: PORT = 5245 app.run(HOST, PORT, debug=True)
from API import app if __name__ == '__main__': app.run(host="0.0.0.0")
def schedule_api(self): """ 开启API """ app.run(API_HOST, API_PORT)
from API import app if __name__ == '__main__': app.run(host="0.0.0.0", port='5000')