Bases: object
Mixin for Redis subscription client commands (e.g. SUBSCRIBE, UNSUBSCRIBE).
Source code in pyredis/commands/subscribe.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 | class Subscribe(object):
"""Mixin for Redis subscription client commands (e.g. SUBSCRIBE, UNSUBSCRIBE)."""
def write(self, *args):
raise NotImplementedError
def psubscribe(self, *args):
return self.write(
*[b"PSUBSCRIBE", *args]
)
def punsubscribe(self, *args):
return self.write(
*[b"PUNSUBSCRIBE", *args]
)
def subscribe(self, *args):
return self.write(
*[b"SUBSCRIBE", *args]
)
def unsubscribe(self, *args):
return self.write(
*[b"UNSUBSCRIBE", *args]
)
|
psubscribe(*args)
Source code in pyredis/commands/subscribe.py
| def psubscribe(self, *args):
return self.write(
*[b"PSUBSCRIBE", *args]
)
|
punsubscribe(*args)
Source code in pyredis/commands/subscribe.py
| def punsubscribe(self, *args):
return self.write(
*[b"PUNSUBSCRIBE", *args]
)
|
subscribe(*args)
Source code in pyredis/commands/subscribe.py
| def subscribe(self, *args):
return self.write(
*[b"SUBSCRIBE", *args]
)
|
unsubscribe(*args)
Source code in pyredis/commands/subscribe.py
| def unsubscribe(self, *args):
return self.write(
*[b"UNSUBSCRIBE", *args]
)
|
write(*args)
Source code in pyredis/commands/subscribe.py
| def write(self, *args):
raise NotImplementedError
|