summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
authorJean-Philippe CARUANA <jp@barreverte.fr>2012-06-14 12:43:53 +0200
committerJean-Philippe CARUANA <jp@barreverte.fr>2012-06-14 12:43:53 +0200
commit2de8b780755237ce342e2093496fa5e9511f8f8c (patch)
tree3530f637886edac40f104ff3719b0d6a7fde8dab /redis/client.py
parent68c034586650c03b478f06bf13974511ccadbd6c (diff)
downloadredis-py-2de8b780755237ce342e2093496fa5e9511f8f8c.tar.gz
added GETRANGE support
Diffstat (limited to 'redis/client.py')
-rw-r--r--redis/client.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/redis/client.py b/redis/client.py
index 4b34986..78ef51f 100644
--- a/redis/client.py
+++ b/redis/client.py
@@ -393,6 +393,13 @@ class StrictRedis(object):
"""
return self.execute_command('APPEND', key, value)
+ def getrange(self, key, start, end):
+ """
+ Returns the substring of the string value stored at ``key``,
+ determined by the offsets ``start`` and ``end`` (both are inclusive)
+ """
+ return self.execute_command('GETRANGE', key, start, end)
+
def decr(self, name, amount=1):
"""
Decrements the value of ``key`` by ``amount``. If no key exists,