summaryrefslogtreecommitdiff
path: root/redis
diff options
context:
space:
mode:
authorChayim <chayim@users.noreply.github.com>2021-12-22 11:52:25 +0200
committerGitHub <noreply@github.com>2021-12-22 11:52:25 +0200
commit989d06d0832c2cccdb5b74f1b2afab2b2441fc79 (patch)
treeaaf5c46b9fd86cec5f0f799d090c991f17275506 /redis
parent139bcbb07e7bc45a4762c7bcb17f4e80235ef8f8 (diff)
downloadredis-py-989d06d0832c2cccdb5b74f1b2afab2b2441fc79.tar.gz
Support for RESET command since Redis 6.2.0 (#1824)
Diffstat (limited to 'redis')
-rwxr-xr-xredis/client.py1
-rw-r--r--redis/commands/core.py7
2 files changed, 8 insertions, 0 deletions
diff --git a/redis/client.py b/redis/client.py
index 16ffbb0..c7aa17b 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -768,6 +768,7 @@ class Redis(RedisModuleCommands, CoreCommands, SentinelCommands):
"STRALGO": parse_stralgo,
"PUBSUB NUMSUB": parse_pubsub_numsub,
"RANDOMKEY": lambda r: r and r or None,
+ "RESET": str_if_bytes,
"SCAN": parse_scan,
"SCRIPT EXISTS": lambda r: list(map(bool, r)),
"SCRIPT FLUSH": bool_ok,
diff --git a/redis/commands/core.py b/redis/commands/core.py
index 2dd7c10..0823315 100644
--- a/redis/commands/core.py
+++ b/redis/commands/core.py
@@ -817,6 +817,13 @@ class ManagementCommands:
else:
return self.execute_command("LOLWUT", **kwargs)
+ def reset(self):
+ """Perform a full reset on the connection's server side contenxt.
+
+ See: https://redis.io/commands/reset
+ """
+ return self.execute_command("RESET")
+
def migrate(
self,
host,