PubSub
faststream.redis.schemas.PubSub #
PubSub(
channel: str,
pattern: bool = False,
polling_interval: float = 1.0,
)
Bases: NameRequired
A class to represent a Redis PubSub channel.
Source code in faststream/redis/schemas/pub_sub.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |
address instance-attribute #
address: Address = address
The channel this endpoint was declared with, and its Broker address.
name instance-attribute #
name: str
The channel Redis is (p)subscribed to, e.g. logs.* for logs.{level}.
pattern instance-attribute #
pattern: bool = pattern
Whether to subscribe with psubscribe rather than subscribe.
validate classmethod #
validate(value: str | Self, **kwargs: Any) -> Self
validate(value: None, **kwargs: Any) -> None
validate(
value: str | Self | None, **kwargs: Any
) -> Self | None
Factory to create object.
Source code in faststream/_internal/proto.py
30 31 32 33 34 35 | |