class GUnicornFlaskApplication(Application, ABC): def __init__(self, flask_app): self.usage, self.callable, self.prog, self.app = None, None, None, flask_app def run(self, **options): self.cfg = Config() for key, value in options.items(): self.cfg.set(key, value) return Application.run(self) load = lambda self: self.app
class GunicornApp(Application): def __init__(self, app): Application.__init__(self) self.cfg = None self.log = None self.app = app def init(self, parser, opts, args): pass def load(self): return self.app def run(self, **options): self.cfg = Config() for key, value in options.items(): self.cfg.set(key, value) return Application.run(self)
class FlaskApplication(Application): def __init__(self, app): self.usage, self.callable, self.prog, self.app = None, None, None, app def run(self, **options): self.cfg = Config() [self.cfg.set(key, value) for key, value in options.items()] return Application.run(self) load = lambda self: self.app
def run(self, **options): self.cfg = Config() for key, value in options.items(): self.cfg.set(key, value) return Application.run(self)
def run(self, **options): self.cfg = Config() [self.cfg.set(key, value) for key, value in options.items()] return Application.run(self)