from esales.cluster import Cluster class Esales(object): def __init__(self, app=None): self.cluster = Cluster() if app: self.init_app(app) def init_app(self, app): self.cluster.url = app.config.get('ESALES_URL')