Ejemplo n.º 1
0
def load_config(**kwargs):
    request_initialize('config', **kwargs)
    request_initialize('logging', **kwargs)
    config.config_amend_(CONFIG_BASE)

    client_options = config.wamp.connection.dict()

    # Going to default to cbor if possible due to the richness of the
    # data types
    try:
        import cbor
        serializers = client_options.get('serializers', ['cbor'])
    except:
        serializers = client_options.get('serializers', ['json'])

    wamp.configure(
        username=client_options.get('username', u''),
        password=client_options.get('password', u''),
        url=client_options.get('url', u'wss://nexus.izaber.com/ws'),
        uri_base=client_options.get('uri_base', u'com.izaber.wamp'),
        realm=client_options.get('realm', u'izaber'),
        authmethods=client_options.get('authmethods', [u'ticket']),
        timeout=client_options.get('timeout', 10),
        serializers=serializers,
    )

    if AUTORUN and config.wamp.get('run', True):
        wamp.run()
Ejemplo n.º 2
0
def load_config(**kwargs):
    request_initialize('config', **kwargs)
    config.config_amend_(CONFIG_BASE)

    request_initialize('logging', **kwargs)
    request_initialize('flask', **kwargs)
    request_initialize('paths', **kwargs)

    # We add the realm when we finally have access
    # to the config (after load). Due to how the flask
    # 'app' variable works, we would need access to config
    # before config loads causing a bit of an annoyance
    app.finalize_wamp_setup(
        realm=config.flask.wamp.realm,
        cookie_name=config.flask.wamp.cookie_name,
    )

    # Register any app we've created as well
    if izaber_flask:
        app.register_blueprint(izaber_flask, url_prefix=r'/')
Ejemplo n.º 3
0
def load_config(**kwargs):
    request_initialize('config', **kwargs)
    request_initialize('logging', **kwargs)
    config.config_amend_(CONFIG_BASE)

    app.secret_key = config.flask.secret_key
def load_config(**kwargs):
    request_initialize('wamp',**kwargs)
    config.config_amend_(CONFIG_BASE)
    zerp.configure(wamp,config.wamp.zerp.database)
Ejemplo n.º 5
0
def load_config(**kwargs):
    request_initialize('config', **kwargs)
    request_initialize('logging', **kwargs)
    config.config_amend_(CONFIG_BASE)