summaryrefslogtreecommitdiff
path: root/redis
diff options
context:
space:
mode:
authorChayim <chayim@users.noreply.github.com>2021-11-03 18:23:50 +0200
committerGitHub <noreply@github.com>2021-11-03 18:23:50 +0200
commit72b49263f86f32c9df945433f21d3f3a7444d1a0 (patch)
tree076e117f6b1eb594fa3114a1bfcf1519ceb8f082 /redis
parent75c5d5974ed3f6a5069f601f4c0d42ad3ae48c76 (diff)
downloadredis-py-72b49263f86f32c9df945433f21d3f3a7444d1a0.tar.gz
SMISMEMBER support (#1667)
Diffstat (limited to 'redis')
-rw-r--r--redis/commands/core.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/redis/commands/core.py b/redis/commands/core.py
index 6512b45..8dba5a2 100644
--- a/redis/commands/core.py
+++ b/redis/commands/core.py
@@ -1768,6 +1768,14 @@ class CoreCommands:
"""Return all members of the set ``name``"""
return self.execute_command('SMEMBERS', name)
+ def smismember(self, name, values, *args):
+ """
+ Return whether each value in ``values`` is a member of the set ``name``
+ as a list of ``bool`` in the order of ``values``
+ """
+ args = list_or_args(values, args)
+ return self.execute_command('SMISMEMBER', name, *args)
+
def smove(self, src, dst, value):
"""Move ``value`` from set ``src`` to set ``dst`` atomically"""
return self.execute_command('SMOVE', src, dst, value)