def main(typeIn): m_info['type'] = typeIn m_cfg['type'] = typeIn parser = ArgumentParser() host, port, peer = init(parser) thread = Thread(target=finalise, args=(host, peer, port)) thread.start() app.run(host=host, port=port, threaded=True)
def main(argv): try: opts, args = getopt.getopt(argv, "hu:m:r:", ["user="******"module=", "retrieve="]) except getopt.GetoptError: print(cmd_helper()) sys.exit(2) user_file = None module_file = None job_uuid = None for opt, arg in opts: if opt == '-h': print(cmd_helper()) sys.exit() if opt in ("-u", "--user"): user_file = os.path.normpath(arg) if opt in ("-m", "--module"): module_file = os.path.normpath(arg) if opt in ("-r", "--retrieve"): job_uuid = str(arg) try: if user_file is not None: if module_file is not None: # Launch staging w/ user input and staging module sequence app.run_with_module(user_file, module_file) else: # Launch staging on User Input only app.run(user_file) elif job_uuid is not None: app.retrieve(job_uuid) else: print(cmd_helper()) except BaseException as err: print(err)
from project import app if __name__ == "__main__": app.run(debug=True, host='0.0.0.0', port=5000)
from project import app if __name__ == "__main__": app.run(host='127.0.0.1', port=5000)
#!/usr/bin/env python from project import app from project.model import evaluate if __name__ == '__main__': app.run('0.0.0.0', debug=True)
import os from project import app port = int(os.environ.get("PORT", 5000)) app.run(host='0.0.0.0', port=port, debug=True)
from project import app if __name__ == '__main__': app.run()
from project import app app.run(port=8888)
from project import app, settings # Main com Run pra rodar com o python -m if __name__ == "__main__": app.run(host=settings.FLASK_HOST, port=settings.FLASK_PORT, debug=settings.FLASK_DEBUG)
def deploy(): """ Run server on port 8080 with deployment config. """ configure_app(app, DeploymentConfig) app.run(host='0.0.0.0', port=8080)
def testing(): """ Run server on port 8080 with testing config. """ configure_app(app, TestingConfig) app.run(host='0.0.0.0', port=8080)
# project/run.py from project import app app.run(debug=True, port=5001)
def run(): """ Run server on port 8080 with default config. """ app.run(host='0.0.0.0', port=8080)
''' Created on 17. aug. 2015 @author: Criblica ''' from project import db, app from project.models import * from project.routes import * import project.configs as configs if __name__ == '__main__': #app.secret_key = 'This is my supersecret key that nobody knows about, except my butcher!!!' #app.run() app.config.from_object(configs.ProductionConfig) app.run(host="192.168.10.168", port=80, debug=True) #192.168.10.168
from project import app import os port = int(os.environ.get("PORT", 5000)) app.run(host="0.0.0.0", port=port)
def runserver(*args, **kwargs): app.run(host='0.0.0.0', port=8000)
#! python3.4 # -*- coding: utf-8 -*- import json from project import app, config # Startup if __name__ == '__main__': app.run(debug=config['app']['debug'], host=config['flask']['HOST'], port=config['flask']['PORT'])
def custom_config(config_file): """ Run server on port 8080 with custom config file. """ configure_app(app, os.path.abspath(config_file), is_pyfile=True) app.run(host='0.0.0.0', port=8080)
from project import app if __name__ == '__main__': print('inside app') app.run(debug=True)
"""Run file. Author: Razen Chris Marling Date: Feb 04, 2018 Project Name: Rocka Village Inventory System - API Description for this file: this is the heart of the project """ from project import app if __name__ == '__main__': app.run(host=app.config['BIND_IP'], port=app.config['BIND_PORT'], debug=app.config['DEBUG'])
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from project import app import dotenv if __name__ == '__main__': CONFIG = dotenv.dotenv_values() port = int(os.environ.get("PORT", 5017)) app.run("localhost", port=port)
# -*- coding: utf-8 -*- from project import app if __name__ == '__main__': app.run(port=8092, debug=True)
# from flask.cli import FlaskGroup # from project import app, db, User # cli = FlaskGroup(app) # @cli.command("create_db") # def create_db(): # db.drop_all() # db.create_all() # db.session.commit() # @cli.command("seed_db") # def seed_db(): # db.session.add(User(email="*****@*****.**")) # db.session.commit() # if __name__ == "__main__": # cli()from project import app from project import app if __name__ == "__main__": app.run(debug=True, host="0.0.0.0")
from project import app app.run(host="0.0.0.0",port=80)
import os from project import app if __name__ == '__main__': port = int(os.environ.get("PORT", 5000)) app.run('127.0.0.1', port=port)
#!/usr/bin/env python # -*- coding: utf-8 -*- from project import app from project.models import printer if __name__=='__main__': app.run('0.0.0.0',debug=True)
#!/usr/bin/env python #-*- coding: utf-8 -*- """ .. module:: run :platform: Unix, Windows :synopsis: The app run file. .. moduleauthor:: Charles Wood <*****@*****.**> """ import os from project import app DEBUG = os.getenv('DEBUG', 'True') == 'True' PORT = os.getenv('PORT', '5000') HOST = os.getenv('HOST', 'localhost') if __name__ == '__main__': app.run(host=HOST, port=int(PORT), debug=DEBUG)
from project import app from sys import argv if __name__ == '__main__': if len(argv) == 2 and argv[1] == "-noreload": app.run(use_reloader=False) else: app.run()
from project import app if __name__ == '__main__': app.run(port=5001)
def run(): port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', port=port)
from project import app app.run(port=8838) ##@app.route('/') ##def hello_world(): ## return render_template('admin/index.html') ##@app.route('/addCategory') ##def addCategory(): ## return render_template('admin/addCategory.html') ##@app.route('/addSubcategory') ##def viewSubcategory(): ## return render_template('admin/addSubcategory.html') ##@app.route('/viewReatiler') ##def viewReatiler(): ## return render_template('admin/viewReatiler.html') ##@app.route('/viewDistributor') ##def viewDistributor(): ## return render_template('admin/viewDistributor.html') ##@app.route('/viewProduct') #### return render_template('admin/viewProduct.html') ##@app.route('/addProduct') ##def addProduct(): ## return render_template('admin/addProduct.html')
def run(): """ Run application """ app.run(debug=True)
from project import app app.run(threaded=True, port=5678)
from project import app app.run(port=8000)
from project import app from project import build_sample_db import os createcount = 0 if __name__ == '__main__': # Build a sample db on the fly, if one does not exist yet. app_dir = os.path.realpath(os.path.dirname(__file__)) proj_dir = 'project' database_path = os.path.join(app_dir, proj_dir, app.config['DATABASE_FILE']) if not os.path.exists(database_path): build_sample_db() if createcount == 0: build_sample_db() createcount = 1 app.run(host='0.0.0.0', port=5000, debug=True)
from project import app if __name__ == '__main__': app.run(host = '0.0.0.0')
# FlaskTaskr/run.py import os from project import app port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', port=port)
def main(): debug = False if len(argv) > 1 and argv[1] == "debug": debug = True app.run(host="0.0.0.0", debug=debug)
from project import app if __name__ == '__main__': app.run(debug=app.config['DEBUG'], port=app.config['PORT'])
from project import app from project.config import config if __name__ == '__main__': app.run(host=config['HOST'], port=config['PORT'], debug=config['DEBUG'])
### IMPORT REQUIRED PYTHON MODULES ### import json from project import app ### START THE APP ### if __name__ == '__main__': app.run(host="0.0.0.0", port="8080")
from project import app app.run(debug=True, host='0.0.0.0', port=5000)
""" geolocator = Nominatim() location = geolocator.geocode("%s %s %s %s" % (street_address, city, state, country)) return location.latitude, location.longitude def get_address_from_coordinates(latitude, longitude): """ Get a street address from coordinates :param latitude: Starting latitude :param longitude: Starting longitude :return: """ geolocator = Nominatim() location = geolocator.reverse("%.2f, %.2f" % (float(latitude), float(longitude))) return location.address @app.route("/get_data", methods=['POST']) @login_required def get_data(): """ Handles asynchronous request to get information about a food pantry on the front-end form :return: Data about the food pantry """ destination = request.form['destination'] return jsonify(marker_addresses[destination]) if __name__ == "__main__": app.run(debug=True)
from project import app from project.application import configure_app from project.config import ProductionConfig configure_app(app, ProductionConfig()) if __name__ == '__main__': app.run(host='0.0.0.0', port=8080)
from project import app if __name__ == '__main__': app.run(threaded=True)
from project import app if __name__ == '__main__': app.run(host="0.0.0.0")
from project import app if __name__ == "__main__": app.run(host='0.0.0.0', port=9000)
from project import app #app.run(debug = False) app.run(debug = True, port=4000, host='0.0.0.0')
#!/usr/bin/env python3 from project import app if __name__ == "__main__": app.run(host='0.0.0.0')
#!/usr/bin/env python from project import app if __name__ == '__main__': app.run('0.0.0.0')
from project import app, db from flask_restful import Resource, Api from flask_restful import Api from project.users.views import SendSerial from project.admin.views import Login, Logout, PostProduct, GetProduct, GetPhone, Getby, Request api = Api(app) api.add_resource(SendSerial, '/SendSerial') api.add_resource(Login, '/login-admin') api.add_resource(Logout, '/logout-user') api.add_resource(PostProduct, '/PostProduct') api.add_resource(GetProduct, '/GetProduct') api.add_resource(GetPhone, '/GetPhone') api.add_resource(Getby, '/Getby') api.add_resource(Request, '/Request') if __name__ == '__main__': app.run(host='0.0.0.0', port=80)
# -*- coding: utf-8 -*- import os from project import app if __name__ == '__main__': port = int(os.environ.get("PORT", 8080)) app.run('0.0.0.0', port=port)
from project import app if __name__ == "__main__": app.run(port=8000)
#!/usr/bin/env python3 from project import app import sys if __name__ == '__main__': if len(sys.argv) > 1: app.run(host=sys.argv[1]) else: app.run(host='0.0.0.0', port='5000')
from project import app app.run(port=1564, threaded=True)
DEBUG = False from project import app if __name__ == "__main__": app.run(host="192.168.4.112", port=5000)
from project import app if __name__ == '__main__': app.run(host=app.config.get('HOST'), port=app.config.get('PORT'))
import os from project import app port=int(os.environ.get('PORT',5000)) app.run(host='0.0.0.0',port=port)
from project import app, db #Run the application if __name__ == '__main__': app.run(debug=True, port=5000)