def build_backend(self, conn_string):
        """
        Given a DSN, returns an instantiated backend class.

        Ex::

            backend = gator.build_backend('locmem://')
            # ...or...
            backend = gator.build_backend('redis://127.0.0.1:6379/0')

        :param conn_string: A DSN for connecting to the queue. Passed along
            to the backend.
        :type conn_string: string

        :returns: A backend ``Client`` instance
        """
        backend_name, _ = conn_string.split(':', 1)
        backend_path = 'alligator.backends.{}_backend'.format(backend_name)
        client_class = import_attr(backend_path, 'Client')
        return client_class(conn_string)
def build_backend ( self , conn_string ) : backend_name , _ = conn_string . split ( ':' , 1 ) backend_path = 'alligator.backends.{}_backend' . format ( backend_name ) client_class = import_attr ( backend_path , 'Client' ) return client_class ( conn_string )
Given a DSN, returns an instantiated backend class.

        Ex::

            backend = gator.build_backend('locmem://')
            # ...or...
            backend = gator.build_backend('redis://127.0.0.1:6379/0')

        :param conn_string: A DSN for connecting to the queue. Passed along
            to the backend.
        :type conn_string: string

        :returns: A backend ``Client`` instance