tcex.tcex_redis module¶
TcEx Framework Redis Module
-
class
tcex.tcex_redis.TcExRedis(host, port, rhash)[source]¶ Bases:
objectCreate/Read Data in/from Redis
-
blpop(keys, timeout=30)[source]¶ RPOP a value off the first empty list in keys.
Note
If timeout is 0, the block indefinitely.
Parameters: - keys (string|list) – The key(s) to pop the value.
- timeout (int) – The number of seconds to wait before blocking stops.
Returns: The response from Redis.
Return type: (string)
-
create(key, value)[source]¶ Create key/value pair in Redis.
Parameters: - key (string) – The key to create in Redis.
- value (any) – The value to store in Redis.
Returns: The response from Redis.
Return type: (string)
-
hdel(key)[source]¶ Delete data from Redis for the provided key.
Parameters: key (string) – The key to delete in Redis. Returns: The response from Redis. Return type: (string)
-
hget(key)[source]¶ Read data from Redis for the provided key.
Parameters: key (string) – The key to read in Redis. Returns: The response data from Redis. Return type: (any)
-
hgetall()[source]¶ Read data from Redis for the provided key.
Parameters: key (string) – The key to read in Redis. Returns: The response data from Redis. Return type: (any)
-