Skip to content

SubscriberRoute

faststream.broker.router.SubscriberRoute #

SubscriberRoute(call, *args, publishers=(), **kwargs)

Bases: ArgsContainer

A generic class to represent a broker route.

Initialize a callable object with arguments and keyword arguments.

Source code in faststream/broker/router.py
def __init__(
    self,
    call: Callable[..., Any],
    *args: Any,
    publishers: Iterable[ArgsContainer] = (),
    **kwargs: Any,
) -> None:
    """Initialize a callable object with arguments and keyword arguments."""
    self.call = call
    self.publishers = publishers

    super().__init__(*args, **kwargs)

args instance-attribute #

args = args

kwargs instance-attribute #

kwargs = kwargs

call instance-attribute #

call = call

publishers instance-attribute #

publishers = publishers