Public Member Functions | Static Public Attributes
rocon_python_redis.client.Redis Class Reference
Inheritance diagram for rocon_python_redis.client.Redis:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def lrem
def pipeline
def setex
def zadd

Static Public Attributes

tuple RESPONSE_CALLBACKS

Detailed Description

Provides backwards compatibility with older versions of redis-py that
changed arguments to some commands to be more Pythonic, sane, or by
accident.

Definition at line 1277 of file client.py.


Member Function Documentation

def rocon_python_redis.client.Redis.lrem (   self,
  name,
  value,
  num = 0 
)
Remove the first ``num`` occurrences of elements equal to ``value``
from the list stored at ``name``.

The ``num`` argument influences the operation in the following ways:
    num > 0: Remove elements equal to value moving from head to tail.
    num < 0: Remove elements equal to value moving from tail to head.
    num = 0: Remove all elements equal to value.

Reimplemented from rocon_python_redis.client.StrictRedis.

Definition at line 1315 of file client.py.

def rocon_python_redis.client.Redis.pipeline (   self,
  transaction = True,
  shard_hint = None 
)
Return a new pipeline object that can queue multiple commands for
later execution. ``transaction`` indicates whether all commands
should be executed atomically. Apart from making a group of operations
atomic, pipelines are useful for reducing the back-and-forth overhead
between the client and server.

Reimplemented from rocon_python_redis.client.StrictRedis.

Definition at line 1291 of file client.py.

def rocon_python_redis.client.Redis.setex (   self,
  name,
  value,
  time 
)
Set the value of key ``name`` to ``value`` that expires in ``time``
seconds. ``time`` can be represented by an integer or a Python
timedelta object.

Reimplemented from rocon_python_redis.client.StrictRedis.

Definition at line 1305 of file client.py.

def rocon_python_redis.client.Redis.zadd (   self,
  name,
  args,
  kwargs 
)
NOTE: The order of arguments differs from that of the official ZADD
command. For backwards compatability, this method accepts arguments
in the form of name1, score1, name2, score2, while the official Redis
documents expects score1, name1, score2, name2.

If you're looking to use the standard syntax, consider using the
StrictRedis class. See the API Reference section of the docs for more
information.

Set any number of element-name, score pairs to the key ``name``. Pairs
can be specified in two ways:

As *args, in the form of: name1, score1, name2, score2, ...
or as **kwargs, in the form of: name1=score1, name2=score2, ...

The following example would add four values to the 'my-key' key:
redis.zadd('my-key', 'name1', 1.1, 'name2', 2.2, name3=3.3, name4=4.4)

Reimplemented from rocon_python_redis.client.StrictRedis.

Definition at line 1327 of file client.py.


Member Data Documentation

Initial value:
dict_merge(
        StrictRedis.RESPONSE_CALLBACKS,
        {
            'TTL': lambda r: r != -1 and r or None,
        }
    )

Reimplemented from rocon_python_redis.client.StrictRedis.

Definition at line 1284 of file client.py.


The documentation for this class was generated from the following file:


rocon_python_redis
Author(s): Andy McCurdy
autogenerated on Fri May 2 2014 10:35:49