diff options
author | Jean-Philippe CARUANA <jp@barreverte.fr> | 2012-06-14 12:43:53 +0200 |
---|---|---|
committer | Jean-Philippe CARUANA <jp@barreverte.fr> | 2012-06-14 12:43:53 +0200 |
commit | 2de8b780755237ce342e2093496fa5e9511f8f8c (patch) | |
tree | 3530f637886edac40f104ff3719b0d6a7fde8dab /redis/client.py | |
parent | 68c034586650c03b478f06bf13974511ccadbd6c (diff) | |
download | redis-py-2de8b780755237ce342e2093496fa5e9511f8f8c.tar.gz |
added GETRANGE support
Diffstat (limited to 'redis/client.py')
-rw-r--r-- | redis/client.py | 7 |
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, |