def backend(cls, namespace): if namespace: backend = cls.cfg.backend_server or 'redis://127.0.0.1:6379' scheme, address, params = parse_connection_string(backend) params['namespace'] = namespace return get_connection_string(scheme, address, params) else: return cls.cfg.backend_server
def get_connection_string(cls, scheme, address, params, name): """Create the connection string used during initialisation of a new :attr:`Backend`.""" if name: params["name"] = name return get_connection_string(scheme, address, params)
def get_connection_string(cls, scheme, address, params, name): '''Create the connection string used during initialisation of a new :attr:`Backend`.''' if name: params['name'] = name return get_connection_string(scheme, address, params)
def get_connection_string(cls, scheme, address, params, name): if name: params['namespace'] = '%s.' % name return get_connection_string(scheme, address, params)
def get_connection_string(cls, scheme, address, params, name): '''The ``name`` is used to set the ``namespace`` parameters in the connection string.''' if name: params['namespace'] = '%s.' % name return get_connection_string(scheme, address, params)