diff --git a/RedisLibrary/RedisLibraryKeywords.py b/RedisLibrary/RedisLibraryKeywords.py index 01fbf67..6df8d43 100644 --- a/RedisLibrary/RedisLibraryKeywords.py +++ b/RedisLibrary/RedisLibraryKeywords.py @@ -59,6 +59,19 @@ def get_from_redis(self, redis_conn, key): """ return redis_conn.get(key) + @keyword('Get Set From Redis Set') + def get_set_from_redis_set(self, redis_conn, key): + """ Get cached members from Redis sets + + Arguments: + - redis_conn: Redis connection object + - key: Set keyword to find. + + Examples: + | ${data}= | Get Set From Redis Set | ${redis_conn} | BARCODE:12345:67890 | + """ + return redis_conn.smembers(key) + @keyword('Get Dictionary From Redis Hash') def get_dict_from_redis_hash(self, redis_conn, name): """ Get cached data from Redis hashes