iota/adapter/wrappers.py
def add_route(self, command, adapter):
        # type: (Text, AdapterSpec) -> RoutingWrapper
        """
        Adds a route to the wrapper.

        :param command:
            The name of the command to route (e.g., "attachToTangle").

        :param adapter:
            The adapter object or URI to route requests to.
        """
        if not isinstance(adapter, BaseAdapter):
            try:
                adapter = self.adapter_aliases[adapter]
            except KeyError:
                self.adapter_aliases[adapter] = adapter = resolve_adapter(
                    adapter
                )

        self.routes[command] = adapter

        return self
def add_route(self, command, adapter):
        # type: (Text, AdapterSpec) -> RoutingWrapper
        if not isinstance(adapter, BaseAdapter):
            try:
                adapter = self.adapter_aliases[adapter]
            except KeyError:
                self.adapter_aliases[adapter] = adapter = resolve_adapter(
                    adapter
                )

        self.routes[command] = adapter

        return self
def add_route ( self , command , adapter ) : # type: (Text, AdapterSpec) -> RoutingWrapper if not isinstance ( adapter , BaseAdapter ) : try : adapter = self . adapter_aliases [ adapter ] except KeyError : self . adapter_aliases [ adapter ] = adapter = resolve_adapter ( adapter ) self . routes [ command ] = adapter return self
Adds a route to the wrapper.

        :param command:
            The name of the command to route (e.g., "attachToTangle").

        :param adapter:
            The adapter object or URI to route requests to.
Adds a route to the wrapper .