def main(): config = ApplicationConfig() context = Context() app = configure_app(config, context) app.run(host=config.sanic.host, port=config.sanic.port, workers=config.sanic.workers, debug=config.sanic.debug)
def main(): config = ApplicationConfig() context = Context() app = configure_app(config, context) app.run( host=config.sanic.host, port=config.sanic.port, workers=config.sanic. workers, # number of application instances to be saved to the server (that will work) debug=config.sanic.debug)
def main(): """ Главная функция для запуска всего приложения """ config = ApplicationConfig() context = Context() app = configure_app(config, context) app.run( host=config.sanic.host, port=config.sanic.port, workers=config.sanic.workers, debug=config.sanic.debug, )
# файл main.py необходим исключительно для запуска программы from transport.sanic.configure_sanic import configure_app from configs.config import ApplicationConfig from context import Context # запускаем программу if __name__ == '__main__': config = ApplicationConfig() context = Context() app = configure_app(config, context) app.run( host=config.sanic.host, port=config.sanic.port, workers=config.sanic.workers, debug=config.sanic.debug, )
def get_sqlalchemy_url() -> str: app_config = ApplicationConfig() return app_config.database.url
def get_url() -> str: config_url = ApplicationConfig() return config_url.database.url