Example #1
0
from API import app

if __name__ == '__main__':
    app.run()
Example #2
0
from API import app

if __name__ == '__main__':
    app.run(debug=True)
Example #3
0
from API import app

app.run(
    host='0.0.0.0',
    port=80,
    debug=True,
)
Example #4
0
# 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')
Example #5
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()
Example #7
0
@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()

Example #8
0
from API import app

app.run(host='0.0.0.0', port=1300, debug=True)
Example #9
0
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)
Example #10
0
from API import app

app.run("0.0.0.0", port=80)
Example #11
0
import API
from API import app
app.run(port='5002')  ##ssl_context='adhoc'
Example #12
0
 def schedule_api(self):
     """开启 API"""
     app.run()
Example #13
0
from API import app

app.run(host='127.0.0.1', port=80, debug=True)
Example #14
0
"""
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)
Example #15
0
from API import app

if __name__ == '__main__':
    app.run(host="0.0.0.0")
Example #16
0
 def schedule_api(self):
     """
     开启API
     """
     app.run(API_HOST, API_PORT)
Example #17
0
from API import app

if __name__ == '__main__':
    app.run(host="0.0.0.0", port='5000')