Exemple #1
0
def main(place, date=None, forecast=None):
    """
    The main method takes the command line arguments and call the app.py
    to get the info of entered place

    """
    if not date:
        date = (datetime.date.today()).strftime("%b %d").upper()

    if not forecast:
        forecast = "monthly"

    obj = APP(place, date, forecast)
    
    try:
        data = obj.run()
        
        if not data:
            return {}

        return data
    except:
        return {}
#!flask/bin/python
# -*- coding: utf-8 -*-

"""Start the Flask server."""


import sys
from os import path

sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
from app import APP


APP.run(host="0.0.0.0", port=8888, debug=True)
Exemple #3
0
def run():
    with Valves() as valves:
        APP.valves = valves
        APP.run(APP.config['HOST'], APP.config['PORT'], debug=True)
Exemple #4
0
def main():
    APP.run(threaded=True)
"""
Module 1 launcher
"""
from app import APP

if __name__ == "__main__":
    APP.run(host=APP.config["FLASK_HOST_ADDRESS"],
            port=APP.config["FLASK_PORT"])
#! /usr/bin/env python
""" Our github hook receiving server. """

from app import APP

APP.run(host='0.0.0.0')
Exemple #7
0
from app import APP

if __name__ == "__main__":
    APP.run()
Exemple #8
0
"""Runs the dev server"""
from app import APP

if __name__ == "__main__":
    APP.run(port=5000)
Exemple #9
0
import os
from app import APP

if __name__ == "__main__":
    APP.run(host=os.getenv("IP"), port=os.getenv("PORT"), debug=os.getenv("DEBUG"))
Exemple #10
0
from app import APP, my_port

APP.run(host="0.0.0.0", threaded=True, port=my_port)
Exemple #11
0
def runserver():
    """This arguments will run your server"""
    app.run(port=8009, debug=True)
Exemple #12
0
import os
from app import APP
host=os.environ.get("FLASK_HOST", "0.0.0.0")
port=os.environ.get("FLASK_PORT", 5000)
APP.run(host=host, port=port, debug=False, threaded=True)
Exemple #13
0
#!/usr/bin/env python
"""
   Run the server for the app.
   Note: Run as root on production, and user locally.
"""
from getpass import getuser
from app import APP
from util import parse_args

parse_args()

if getuser() == "root":
    APP.run(debug=False, host="172.31.11.17", port=80)
else:
    APP.run(debug=True)
import os
from app import APP
if __name__ == "__main__":
    if (os.environ.get("DATABASE_URL") == ""
            or os.environ.get("DATABASE_URL") is None):
        # init a memory database to use
        from initDB import init_database
        print("Initializing database")
        init_database()
    start = False
    port = 5000
    debug = os.environ.get("DEBUG", False)
    while not start and port < 5010:
        try:
            APP.run(debug=debug, port=port)
            start = True
        except OSError as e:
            print(e)
            print(f"Port:{port} taken trying another")
            port += 1
Exemple #15
0
def main(argv):
    """Start development web server."""
    APP.run(host=APP.config['HOST'], port=APP.config['PORT'], threaded=True)
from app import APP
APP.run(host='0.0.0.0', port=5000, debug=True, threaded=True)
Exemple #17
0
from app import APP as application

if __name__ == "__main__":
    print(application)
    application.run(debug=True, threaded=True)
Exemple #18
0
"""
Module for running server
"""
import os
from app import APP
from healthcheck import HEALTHCHECK


APP.register_blueprint(HEALTHCHECK)

ENV = os.environ.get('ENV', None)

if ENV == 'local':
    APP.run(host='0.0.0.0', port=1000)
Exemple #19
0
def run_app():
    """Starts the server and debugs with the shell"""
    APP.run(debug=True)
Exemple #20
0
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from app import APP

if __name__ == '__main__':
    application = APP()
    application.run()
Exemple #21
0
# -*- coding: utf-8 -*-

from app import APP


if __name__ == "__main__":
    APP.run(debug=True, host="0.0.0.0", threaded=True)
Exemple #22
0
''' The server'''
from app import APP

APP.run(port=3001, debug=True)
Exemple #23
0
#!flask/bin/python
from app import APP

APP.run(debug=True)
Exemple #24
0
from app import APP

if __name__ == '__main__':
    APP.run(debug=True, host="localhost", port=5000)
Exemple #25
0
""" The app's Entry Point"""
from app import APP
import os

if __name__ == '__main__':
    APP.secret_key = 'A0Zr98j/3yX R~XHH!jmN]LWX/,?RT'
    port = int(os.environ.get('PORT', 5000))
    APP.run('', port=port, debug=True)
Exemple #26
0
""" Attaches the flask profiler """
from app import APP, CONFIGURATION
from werkzeug.contrib.profiler import ProfilerMiddleware

APP.config['PROFILE'] = True
APP.wsgi_app = ProfilerMiddleware(APP.wsgi_app, restrictions=[30])

if __name__ == '__main__':
    APP.run(debug=CONFIGURATION.debug_mode,
            host=CONFIGURATION.backend_ip,
            port=CONFIGURATION.port)
Exemple #27
0
'''launcher'''

from app import APP

if __name__ == '__main__':
    APP.run('127.0.0.1', debug=True, threaded=True)

Exemple #28
0
"""
Entry Point of the Flask Server
"""

from app import APP

if __name__ == "__main__":
    APP.run(host='0.0.0.0', port=8080)
Exemple #29
0
""" This File is used to run the app deployed or locally"""
import os
from app import APP

port = int(os.environ.get('PORT', 33506))
# to run local
#APP.run(debug=APP.config['DEBUG'], use_reloader=APP.config['RELOADER'])
# run deployed
APP.run(debug=APP.config['DEBUG'], use_reloader=APP.config['RELOADER'], port=port, host='0.0.0.0')
Exemple #30
0
# -*- encoding: utf-8 -*-
'''
Current module: pyrunnerwbs.run

Rough version history:
v1.0    Original version to use

********************************************************************
    @AUTHOR:  Administrator-Bruce Luo(罗科峰)
    MAIL:    [email protected]
    RCS:      pyrunnerwbs.run,v 1.0 2016年4月24日
    FROM:   2016年4月24日
********************************************************************

======================================================================

UI and Web Http automation frame for python.

'''

from app import APP
APP.run(debug=True)
Exemple #31
0
    # If no environment is provided, assume 'dev' environment
    ENV = sys.argv[1] if len(sys.argv) > 2 else 'dev'

    # Local development settings
    if ENV == 'dev':
        Config = config.DevelopmentConfig
        port = Config.FLASK_PORT
        host = Config.FLASK_HOST
        debug = Config.DEBUG

    # Production server settings
    elif ENV == 'prod':
        Config = config.ProductionConfig
        port = os.environ.get('FLASK_PORT') # These should be set as system variables
        host = os.environ.get('FLASK_HOST') # These should be set as system variables
        debug = Config.DEBUG

    # Local test settings
    elif ENV == 'test':
        Config = config.TestConfig
        port = Config.FLASK_PORT
        host = Config.FLASK_HOST
        debug = Config.DEBUG

    else:
        raise ValueError('Invalid enviroment name provided')

    # Start the application
    APP.run(host=host, port=int(port), debug=debug)
Exemple #32
0
def main():
    APP.run(debug=True, host='0.0.0.0', threaded=True)
Exemple #33
0
#!/usr/bin/env python

"""
   Run the server for the app.
   Note: Run as root on production, and user locally.
"""
from getpass import getuser
from app import APP
from util import parse_args

parse_args()


if getuser() == "root":
    APP.run(debug=False, host="172.31.11.17", port=80)
else:
    APP.run(debug=True)
Exemple #34
0
""" Runs the server """
from app import APP

APP.run(ssl_context='adhoc')
Exemple #35
0
#!/usr/bin/python
'''
:since: 01/08/2015
:author: oblivion
'''
from app import APP

APP.run(debug=APP.config['DEBUG'], host='0.0.0.0')