Skip to content

Commit

Permalink
Merge pull request #1 from chilispa/add_smembers
Browse files Browse the repository at this point in the history
Smembers From Redis Added
  • Loading branch information
cosimomeli authored Aug 29, 2018
2 parents a81d394 + 07914a9 commit c20c7a3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions RedisLibrary/RedisLibraryKeywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c20c7a3

Please sign in to comment.