platypush.plugins.redis

class platypush.plugins.redis.RedisPlugin(*args, **kwargs)[source]

Plugin to send messages on Redis queues.

Requires:

  • redis (pip install redis)
__init__(*args, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

delete(*args)[source]

Delete one or multiple keys

Parameters:args – Keys to delete
expire(key, expiration)[source]

Set an expiration time in seconds for the specified key

Parameters:
  • key (str) – Key to set to expire
  • expiration (int) – Expiration timeout (in seconds)
mget(keys, *args)[source]
Returns:The values specified in keys as a key/value dict (wraps MGET)
mset(**kwargs)[source]

Set key/values based on mapping (wraps MSET)

send_message(queue, msg, *args, **kwargs)[source]

Send a message to a Redis queue.

Parameters: