### Install RedisLibrary via pip Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Install the robotframework-redislibrary package using pip. Use the -U flag to upgrade to the latest version. ```bash pip install -U robotframework-redislibrary ``` -------------------------------- ### Get All Match Keys Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves all keys matching a pattern. ```APIDOC ## Get All Match Keys ### Description Retrieves all keys matching a pattern. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **pattern** (string) - Required - Pattern to match keys. - **count** (integer) - Optional - Maximum number of keys to return. ### Returns List of matching keys. ### Example ``` @{key_list}= Get All Match Keys ${redis_conn} BARCODE* 1000 ``` ``` -------------------------------- ### Get From Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves the value of a key from Redis. ```APIDOC ## Get From Redis ### Description Retrieves the value of a key from Redis. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key to retrieve. ### Returns Value of the key. ### Example ``` ${response_data} Get From Redis ${redis_conn} ${redis_key} ``` ``` -------------------------------- ### Sample Robot Framework test case using RedisLibrary Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html A sample Robot Framework test case that connects to Redis, appends data, retrieves it, verifies key existence, and deletes the key. It also demonstrates using Get All Match Keys with a pattern and count. ```robotframework *** Settings *** Library RedisLibrary *** Test Cases *** Get Requests ${redis_conn} Connect To Redis ${redis_host} ${redis_port} db=${0} Set Test Variable ${redis_key} 1234567890 Set Test Variable ${redis_data} {"data":{"message":"Hello Worlds!!!"}} Append To Redis ${redis_conn} ${redis_key} ${redis_data} ${response_data} Get From Redis ${redis_conn} ${redis_key} Should Be Equal as Strings ${response_data} ${redis_data} Redis Key Should Be Exist ${redis_conn} ${redis_key} Delete From Redis ${redis_conn} ${redis_key} Redis Key Should Not Be Exist ${redis_conn} ${redis_key} @{key_list}= Get All Match Keys ${redis_conn} BARCODE* 1000 ``` -------------------------------- ### Get Set From Redis Set Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves all members of a Redis set. ```APIDOC ## Get Set From Redis Set ### Description Retrieves all members of a Redis set. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the set. ### Returns Set of members. ``` -------------------------------- ### Get Redis Master Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves the Redis master connection. ```APIDOC ## Get Redis Master ### Description Retrieves the Redis master connection. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. ### Returns Master connection object. ``` -------------------------------- ### Get All Item From List Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves all items from a Redis list. ```APIDOC ## Get All Item From List Redis ### Description Retrieves all items from a Redis list. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the list. ### Returns List of items. ``` -------------------------------- ### Get Time To Live In Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Returns the time to live in minutes for a given Redis key. ```APIDOC ## Get Time To Live In Redis ### Description Return time to live in Redis (minutes). ### Arguments - **redis_conn** - Redis connection object - **key** - String keyword to find. ### Example Get Time To Live In Redis | ${redis_conn} | BARCODE|1234567890 ``` -------------------------------- ### Get All Match Keys Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves all keys that match a specific pattern. Requires a Redis connection object, a key pattern (may contain wildcards), and an optional count (default 100). ```APIDOC ## Get All Match Keys ### Description Get all key that matches with specific keyword. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **key** (string) - Required - String keyword to find may contain wildcard. - **count** (integer) - Optional - Element number of returns (Default = 100) ### Example @{key_list}= | Get All Match Keys | ${redis_conn} | BARCODE* | 1000 ``` -------------------------------- ### Get Time To Live In Redis Second Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Returns the time to live in seconds for a given Redis key. ```APIDOC ## Get Time To Live In Redis Second ### Description Return time to live in Redis (seconds). ### Arguments - **redis_conn** - Redis connection object - **key** - String keyword to find. ### Example Get Time To Live In Redis Second | ${redis_conn} | BARCODE|1234567890 ``` -------------------------------- ### Get Redis Cluster Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves the Redis cluster connection. ```APIDOC ## Get Redis Cluster ### Description Retrieves the Redis cluster connection. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. ### Returns Cluster connection object. ``` -------------------------------- ### Get Time To Live In Redis Second Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves the remaining time to live for a key in Redis in seconds. ```APIDOC ## Get Time To Live In Redis Second ### Description Retrieves the remaining time to live for a key in Redis in seconds. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key to check. ### Returns Time to live in seconds. ``` -------------------------------- ### Get Dictionary From Redis Hash Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves a dictionary from a Redis hash. ```APIDOC ## Get Dictionary From Redis Hash ### Description Retrieves a dictionary from a Redis hash. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the hash. ### Returns Dictionary containing the hash fields. ``` -------------------------------- ### Get Length From List Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves the length of a Redis list. ```APIDOC ## Get Length From List Redis ### Description Retrieves the length of a Redis list. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the list. ### Returns Length of the list. ``` -------------------------------- ### Get Time To Live In Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves the remaining time to live for a key in Redis. ```APIDOC ## Get Time To Live In Redis ### Description Retrieves the remaining time to live for a key in Redis. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key to check. ### Returns Time to live in milliseconds. ``` -------------------------------- ### Get All Item From List Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves all items from a Redis list. Requires a Redis connection object and the list name. ```APIDOC ## Get All Item From List Redis ### Description Get all items in list. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **list_name** (string) - Required - List name as key in redis ### Example ${list_items} | Get All Item From List Redis | ${redis_conn} | Country ``` -------------------------------- ### Get From Redis Hash Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves a field value from a Redis hash. ```APIDOC ## Get From Redis Hash ### Description Retrieves a field value from a Redis hash. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the hash. - **field** (string) - Required - Field to retrieve. ### Returns Value of the field. ``` -------------------------------- ### Get Redis Cluster Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Returns the Redis master's address corresponding to the given host and port. Takes a Redis host and port as arguments. ```APIDOC ## Get Redis Cluster ### Description Get from the Redis master's address corresponding. ### Arguments - **redis_host** (string) - Required - hostname or IP address of the Redis server. - **redis_port** (integer) - Optional - Redis port number (default=6379) ### Return Value Cluster detail ### Example @{cluster_detail}= | Get Redis Cluster | 'redis-dev.com' | 6379 ``` -------------------------------- ### Get From Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves cached data from Redis using a string key. This keyword takes a Redis connection object and a key to fetch the corresponding value. ```APIDOC ## Get From Redis ### Description Get cached data from Redis ### Arguments - **redis_conn** (object) - Required - Redis connection object - **key** (string) - Required - String keyword to find ### Example ${data}= | Get From Redis | ${redis_conn} | BARCODE|1234567890 ``` -------------------------------- ### Get Length of Redis Set Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves the cardinality of a Redis set. ```APIDOC ## Get Length of Redis Set ### Description Retrieves the cardinality of a Redis set. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the set. ### Returns Number of elements in the set. ``` -------------------------------- ### Get Item From List Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves an item at a specific index from a Redis list. ```APIDOC ## Get Item From List Redis ### Description Retrieves an item at a specific index from a Redis list. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the list. - **index** (integer) - Required - Index of the item. ### Returns Item at the specified index. ``` -------------------------------- ### Get Redis Master Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Returns the Redis master's address corresponding to the given host, port, and service name. Takes a Redis host, port, and optional service name as arguments. ```APIDOC ## Get Redis Master ### Description Get from the Redis master's address corresponding. ### Arguments - **redis_host** (string) - Required - hostname or IP address of the Redis server. - **redis_port** (integer) - Optional - Redis port number (default=26379) - **service_name** (string) - Optional - Redis master's address corresponding ### Return Value Sentinel detail lists ### Example @{sentinel_detail}= | Get Redis Master | 'redis-dev.com' | 6379 | 'service-name' ``` -------------------------------- ### Get Set From Redis Set Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Returns cached members from a Redis set. Takes a Redis connection object and a set name as arguments. ```APIDOC ## Get Set From Redis Set ### Description Get cached members from Redis sets. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **set_name** (string) - Required - Set name to find. ### Example ${data}= | Get Set From Redis Set | ${redis_conn} | Fruit ``` -------------------------------- ### Get Index of Item From List Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves the index of an item in a Redis list. ```APIDOC ## Get Index of Item From List Redis ### Description Retrieves the index of an item in a Redis list. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the list. - **value** (string) - Required - Value to find. ### Returns Index of the item. ``` -------------------------------- ### Get Length of Redis Set Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Returns the length of a Redis set. Takes a Redis connection object and a set name as arguments. ```APIDOC ## Get Length of Redis Set ### Description Get length of set. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **set_name** (string) - Required - Set name as key in redis ### Example ${set_length} | Get Length of Redis Set | ${redis_conn} | Fruit ``` -------------------------------- ### Get Length From List Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Returns the length of a Redis list. Takes a Redis connection object and a list name as arguments. ```APIDOC ## Get Length From List Redis ### Description Get length of list. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **list_name** (string) - Required - List name as key in redis ### Example ${list_length} | Get Length From List Redis | ${redis_conn} | Country ``` -------------------------------- ### Get Item From List Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves an item from a Redis list at a specific index. This keyword takes a Redis connection object, a list name, and an index to fetch the item at that position. ```APIDOC ## Get Item From List Redis ### Description Get item in list by specific index. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **list_name** (string) - Required - List name as key in redis - **index** (integer) - Required - Index in list that you need to update ### Example ${item_data} | Get Item From List Redis | ${redis_conn} | Country | 1 ``` -------------------------------- ### Get From Redis Hash Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves cached data from a Redis hash by a specific key. This keyword takes a Redis connection object, a hash name, and a key to fetch the corresponding value. ```APIDOC ## Get From Redis Hash ### Description Get cached data from Redis hashes by key ### Arguments - **redis_conn** (object) - Required - Redis connection object - **hash_name** (string) - Required - Hash name - **key** (string) - Required - String keyword to find ### Example ${data}= | Get From Redis Hash | ${redis_conn} | HASHNAME | BARCODE|1234567890 ``` -------------------------------- ### Get Dictionary From Redis Hash Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves cached data from a Redis hash. This keyword takes a Redis connection object and a hash name to return the entire hash data. ```APIDOC ## Get Dictionary From Redis Hash ### Description Get cached data from Redis hashes ### Arguments - **redis_conn** (object) - Required - Redis connection object - **hash_name** (string) - Required - Hash name ### Example ${data}= | Get Dictionary From Redis Hash | ${redis_conn} | HASHNAME ``` -------------------------------- ### Get Index of Item From List Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Retrieves the indices of all occurrences of an item in a Redis list. This keyword takes a Redis connection object, a list name, and an item to search for, returning a list of indices. ```APIDOC ## Get Index of Item From List Redis ### Description Get indexs of item that metched in list. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **list_name** (string) - Required - List name as key in redis - **item** (string) - Required - Search item ### Example ${list_index} | Get Index of Item From List Redis | ${redis_conn} | Country | Germany ### Return Value Returns a list of indices where the item is found, e.g., [0, 1, 5] ``` -------------------------------- ### Connect To Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Establishes a connection to a Redis server using host and port, with optional database selection. ```APIDOC ## Connect To Redis ### Description Establishes a connection to a Redis server using host and port, with optional database selection. ### Method Keyword ### Parameters - **host** (string) - Required - Redis server hostname or IP address. - **port** (integer) - Required - Redis server port. - **db** (integer) - Optional - Database number to use (default 0). ### Returns Connection object for use in other keywords. ### Example ``` ${redis_conn} Connect To Redis ${redis_host} ${redis_port} db=${0} ``` ``` -------------------------------- ### Connect To Redis From URL Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Establishes a connection to a Redis server using a URL. ```APIDOC ## Connect To Redis From URL ### Description Establishes a connection to a Redis server using a URL. ### Method Keyword ### Parameters - **url** (string) - Required - Redis connection URL. ### Returns Connection object for use in other keywords. ``` -------------------------------- ### Connect To Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Establishes a connection to the Redis server and returns a connection object. ```robotframework ${redis_conn}= | Connect To Redis | redis-dev.com | 6379 | redis_password=password ``` -------------------------------- ### Connect To Redis From URL Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Connects to a Redis server using a connection URL and an optional database index. ```robotframework ${redis_conn}= | Connect To Redis From URL | redis://admin:adminpassword@redis-dev.com:6379 ``` -------------------------------- ### Connect To Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Connects to the Redis server and returns a Redis connection object. Supports optional parameters for port, database, password, SSL, and CA certificates. ```APIDOC ## Connect To Redis ### Description Connect to the Redis server. ### Arguments - **redis_host** (string) - Required - hostname or IP address of the Redis server - **redis_port** (integer) - Optional - Redis port number (default=6379) - **db** (integer) - Optional - Redis keyspace number (default=0) - **redis_password** (string) - Optional - password for Redis authentication - **ssl** (boolean) - Optional - Connect Redis with SSL or not (default is False) - **ssl_ca_certs** (string) - Optional - CA Certification when connect Redis with SSL ### Returns Redis connection object ### Example ``` ${redis_conn}= | Connect To Redis | redis-dev.com | 6379 | redis_password=password ``` ``` -------------------------------- ### Connect To Redis From URL Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Connects to a Redis server using a URL and returns a Redis connection object. The URL format includes username, password, host, and port, with an optional database number. ```APIDOC ## Connect To Redis From URL ### Description Connect to the Redis server using a URL and return a Redis connection object. ### Arguments - **redis_url** (string) - Required - URL for connect to Redis. Format: redis://:@:; - **db** (integer) - Optional - Redis keyspace number (default=0) ### Return Value Redis connection object ### Example ${redis_conn}= | Connect To Redis From URL | redis://admin:adminpassword@redis-dev.com:6379 ``` -------------------------------- ### Redis Key Should Be Exist Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Verifies that a key exists in Redis. ```APIDOC ## Redis Key Should Be Exist ### Description Verifies that a key exists in Redis. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key to check. ### Example ``` Redis Key Should Be Exist ${redis_conn} ${redis_key} ``` ``` -------------------------------- ### Redis Key Should Be Exist Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Fails if the specified key does not exist in Redis. Used to assert the presence of a key. ```APIDOC ## Redis Key Should Be Exist ### Description Keyword will fail if specify key doesn't exist in Redis. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **key** (string) - Required - String keyword to find. ### Example ``` Redis Key Should Be Exist | ${redis_conn} | BARCODE|1234567890 ``` ``` -------------------------------- ### Set To Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Sets a key to a value in Redis. ```APIDOC ## Set To Redis ### Description Sets a key to a value in Redis. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key to set. - **value** (string) - Required - Value to set. ``` -------------------------------- ### Set To Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Set data to Redis with an optional TTL. It takes a Redis connection object, a key, data, and an optional expire_time. ```APIDOC ## Set To Redis ### Description Set data to Redis. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **key** (string) - Required - String keyword to find. - **data** (string) - Required - String data - **expire_time** (integer) - Optional - TTL default value is 3600s ### Example Set To Redis | ${redis_conn} | BARCODE|0000000011 | ${data} | Set To Redis | ${redis_conn} | BARCODE|1234567890 | ${data} | expire_time=600 ``` -------------------------------- ### Redis Key Should Not Be Exist Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Verifies that a key does not exist in Redis. ```APIDOC ## Redis Key Should Not Be Exist ### Description Verifies that a key does not exist in Redis. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key to check. ### Example ``` Redis Key Should Not Be Exist ${redis_conn} ${redis_key} ``` ``` -------------------------------- ### Flush All Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Deletes all keys from the Redis database. Requires a Redis connection object. ```APIDOC ## Flush All ### Description Delete all keys from Redis. ### Arguments - **redis_conn** (object) - Required - Redis connection object ### Example Flush All | ${redis_conn} ``` -------------------------------- ### Push Item To First Index In List Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Pushes an item to the beginning of a Redis list. ```APIDOC ## Push Item To First Index In List Redis ### Description Pushes an item to the beginning of a Redis list. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the list. - **value** (string) - Required - Value to push. ``` -------------------------------- ### Redis Hash Key Should Be Exist Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Fails if the specified hash key does not exist in Redis. Used to assert the presence of a hash key. ```APIDOC ## Redis Hash Key Should Be Exist ### Description Keyword will fail if specify hash key doesn't exist in Redis. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **hash_name** (string) - Required - Hash name. - **key** (string) - Required - String keyword to find. ### Example ``` Redis Hash Key Should Be Exist | ${redis_conn} | BARCODE|1234567890 ``` ``` -------------------------------- ### Redis Key Should Not Be Exist Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Keyword will fail if the specified key exists in Redis. It takes a Redis connection object and a key string. ```APIDOC ## Redis Key Should Not Be Exist ### Description Keyword will fail if specify key exist in Redis. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **key** (string) - Required - String keyword to find. ### Example Redis Key Should Not Be Exist | ${redis_conn} | BARCODE|1234567890 ``` -------------------------------- ### Redis Hash Key Should Be Exist Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Verifies that a hash key exists in Redis. ```APIDOC ## Redis Hash Key Should Be Exist ### Description Verifies that a hash key exists in Redis. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the hash. - **field** (string) - Required - Field to check. ``` -------------------------------- ### Redis Hash Key Should Not Be Exist Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Verifies that a hash key does not exist in Redis. ```APIDOC ## Redis Hash Key Should Not Be Exist ### Description Verifies that a hash key does not exist in Redis. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the hash. - **field** (string) - Required - Field to check. ``` -------------------------------- ### Item Should Exist In Redis Set Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Verifies that an item exists in a Redis set. ```APIDOC ## Item Should Exist In Redis Set ### Description Verifies that an item exists in a Redis set. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the set. - **item** (string) - Required - Item to check. ``` -------------------------------- ### Push Item To First Index In List Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Pushes items to the first index of a Redis list. If multiple arguments are provided, the last argument becomes the first item. ```APIDOC ## Push Item To First Index In List Redis ### Description Push item to first index in list. If you many arguments, last arguments will be the first item. ### Arguments - **redis_conn** - Redis connection object - **list_name** - List name as key in redis - **args** - Item that you need to put in set ### Example Push Item To First Index In List Redis | ${redis_conn} | Country | Germany | Italy | France | Spain ${list_items} | Get All Item From List Redis | ${redis_conn} | Country Result from `Get All Item From List Redis`: [b'Spain', b'France', b'Italy', b'Germany'] ``` -------------------------------- ### Redis Hash Key Should Not Be Exist Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Fails if the specified hash key exists in Redis. Used to assert the absence of a hash key. ```APIDOC ## Redis Hash Key Should Not Be Exist ### Description Keyword will fail if specify hash key exist in Redis. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **hash_name** (string) - Required - Hash name. - **key** (string) - Required - String keyword to find. ### Example ``` Redis Hash Key Should Not Be Exist | ${redis_conn} | BARCODE|1234567890 ``` ``` -------------------------------- ### Flush All Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Removes all data from the Redis database. ```APIDOC ## Flush All ### Description Removes all data from the Redis database. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. ``` -------------------------------- ### Set To Redis Hash Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Set data to Redis within a hash. It takes a Redis connection object, hash name, key, and data. ```APIDOC ## Set To Redis Hash ### Description Set data to Redis within Hash. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **hash_name** (string) - Required - String hash - **key** (string) - Required - String keyword to find. - **data** (string) - Required - String data ### Example Set To Redis Hash | ${redis_conn} | HASHNAME | key | value ``` -------------------------------- ### Item Should Not Exist In Redis Set Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Verifies that an item does not exist in a Redis set. ```APIDOC ## Item Should Not Exist In Redis Set ### Description Verifies that an item does not exist in a Redis set. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the set. - **item** (string) - Required - Item to check. ``` -------------------------------- ### Append To Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Appends data to a Redis key, creating it if it does not exist, and returns the new length. ```robotframework Append To Redis | ${redis_conn} | BARCODE|1234567890 | ${data} ``` -------------------------------- ### Item Should Exist In Redis Set Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Checks that an item exists in a Redis set. ```APIDOC ## Item Should Exist In Redis Set ### Description Check item should exist in set. ### Arguments - **redis_conn** - Redis connection object - **set_name** - Set name as key in redis - **item** - Item that you need check ### Example Item Should Exist In Redis Set | ${redis_conn} | Fruit | Apple ``` -------------------------------- ### Set To Redis Hash Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Sets a field in a Redis hash. ```APIDOC ## Set To Redis Hash ### Description Sets a field in a Redis hash. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the hash. - **field** (string) - Required - Field to set. - **value** (string) - Required - Value to set. ``` -------------------------------- ### Append To Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Appends data to an existing key in Redis. ```APIDOC ## Append To Redis ### Description Appends data to an existing key in Redis. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key to append to. - **data** (string) - Required - Data to append. ### Example ``` Append To Redis ${redis_conn} ${redis_key} ${redis_data} ``` ``` -------------------------------- ### Expire Data From Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Sets an expiration time on a Redis key. Requires a Redis connection object, the key, and an optional expiration time in seconds (default 0 means expire now). ```APIDOC ## Expire Data From Redis ### Description Expire items from Redis. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **key** (string) - Required - String keyword to find. - **expire_time** (integer) - Optional - Waiting time to expire data (Default = expire now) ### Example Expire Data From Redis | ${redis_conn} | BARCODE|1234567890 ``` -------------------------------- ### Item Should Not Exist In Redis Set Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Checks that an item does not exist in a Redis set. ```APIDOC ## Item Should Not Exist In Redis Set ### Description Check item should not exist in set. ### Arguments - **redis_conn** - Redis connection object - **set_name** - Set name as key in redis - **item** - Item that you need check ### Example Item Should Not Exist In Redis Set | ${redis_conn} | Fruit | Mongo ``` -------------------------------- ### Add Hash Map To Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Adds a hash map to Redis. ```APIDOC ## Add Hash Map To Redis ### Description Adds a hash map to Redis. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key for the hash. - **mapping** (dictionary) - Required - Hash map to add. ``` -------------------------------- ### Add Hash Map To Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Sets data to Redis within a hash. Takes a Redis connection object, a hash name, and a dictionary of data. ```APIDOC ## Add Hash Map To Redis ### Description Set data to Redis within Hash. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **hash_name** (string) - Required - String hash - **dict_data** (dict) - Required - data as dict ### Example ``` Add Hash Map To Redis | ${redis_conn} | HASHNAME | {"name":"Fred","age":25} ``` ``` -------------------------------- ### Add Set Data To Redis Set Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Adds items into a Redis set identified by a key. ```robotframework Add Set Data To Redis Set | ${redis_conn} | Fruit | Banana | Apple | Orage ``` -------------------------------- ### Add Hash Map To Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Sets data to Redis within a hash using a connection object, hash name, and dictionary data. ```robotframework Add Hash Map To Redis | ${redis_conn} | HASHNAME | {"name":"Fred","age":25} ``` -------------------------------- ### Add Set Data To Redis Set Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Adds data to a Redis set. ```APIDOC ## Add Set Data To Redis Set ### Description Adds data to a Redis set. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the set. - **data** (string) - Required - Data to add. ``` -------------------------------- ### Append To Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Appends data to Redis. If the key doesn't exist, it creates it with the value. Returns the new length of the value at key. ```APIDOC ## Append To Redis ### Description Append data to Redis. If key doesn't exist, create it with value. Return the new length of the value at key. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **key** (string) - Required - String key - **value** (string) - Required - String value ### Example ``` Append To Redis | ${redis_conn} | BARCODE|1234567890 | ${data} ``` ``` -------------------------------- ### Expire Data From Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Sets an expiration time for a key in Redis. ```APIDOC ## Expire Data From Redis ### Description Sets an expiration time for a key in Redis. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key to expire. - **time** (integer) - Required - Expiration time in seconds. ``` -------------------------------- ### Add Set Data To Redis Set Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Adds set data into Redis. Takes a Redis connection object, a set name, and one or more items to add to the set. ```APIDOC ## Add Set Data To Redis Set ### Description Add set data into Redis. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **set_name** (string) - Required - Set name as key in redis - **args** (list) - Required - Item that you need to put in set ### Example ``` Add Set Data To Redis Set | ${redis_conn} | Fruit | Banana | Apple | Orage ``` ``` -------------------------------- ### Push Item To Last Index In List Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Pushes one or more items to the end of a Redis list. The last argument becomes the last item in the list. ```APIDOC ## Push Item To Last Index In List Redis ### Description Push item to last index in list. If you many arguments, last arguments will be the last item. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **list_name** (string) - Required - List name as key in redis - **args** (variadic) - Required - Item that you need to put in set ### Example ``` Push Item To Last Index In List Redis | ${redis_conn} | Country | Germany | Italy | France | Spain ``` ``` -------------------------------- ### Push Item To Last Index In List Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Pushes an item to the end of a Redis list. ```APIDOC ## Push Item To Last Index In List Redis ### Description Pushes an item to the end of a Redis list. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the list. - **value** (string) - Required - Value to push. ``` -------------------------------- ### Delete From Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Deletes a key from Redis. ```APIDOC ## Delete From Redis ### Description Deletes a key from Redis. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key to delete. ### Example ``` Delete From Redis ${redis_conn} ${redis_key} ``` ``` -------------------------------- ### Delete From Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Deletes a specific key from the Redis database. ```robotframework Delete From Redis | ${redis_conn} | BARCODE|1234567890 ``` -------------------------------- ### Update Item In List Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Update an item in a list by specific index. It takes a Redis connection object, list name, index, and new item. ```APIDOC ## Update Item In List Redis ### Description Update item in list by specific index. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **list_name** (string) - Required - List name as key in redis - **index** (integer) - Required - Index in list that you need to update - **item** (string) - Required - New item ### Example Update Item In List Redis | ${redis_conn} | Country | 1 | England ``` -------------------------------- ### Delete From Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Deletes data from Redis using a connection object and a key. The key is a string used to find the data to delete. ```APIDOC ## Delete From Redis ### Description Delete data from Redis. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **key** (string) - Required - String keyword to find. ### Example Delete From Redis | ${redis_conn} | BARCODE|1234567890 ``` -------------------------------- ### Delete Item From List Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Deletes an item from a list by index, with an optional comparison check. ```robotframework Delete Item From List Redis | ${redis_conn} | Country | 2 ``` ```robotframework Delete Item From List Redis | ${redis_conn} | Country | 2 | Spain ``` -------------------------------- ### Delete Set Data In Redis Set Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Deletes data from a Redis set. ```APIDOC ## Delete Set Data In Redis Set ### Description Deletes data from a Redis set. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the set. - **data** (string) - Required - Data to delete. ``` -------------------------------- ### Update Item In List Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Updates an item at a specific index in a Redis list. ```APIDOC ## Update Item In List Redis ### Description Updates an item at a specific index in a Redis list. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the list. - **index** (integer) - Required - Index of the item to update. - **value** (string) - Required - New value. ``` -------------------------------- ### Delete From Redis Hash Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Deletes a key from a hash in Redis. Requires a connection object, the hash name, and the key to delete. ```APIDOC ## Delete From Redis Hash ### Description Delete `key` from hash `name`. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **hash_name** (string) - Required - Hash keyword to find. - **key** (string) - Required - String keyword to find. ### Example Delete From Redis Hash | ${redis_conn} | HASHNAME | KEY ``` -------------------------------- ### Delete Item From List Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Deletes an item from a Redis list. ```APIDOC ## Delete Item From List Redis ### Description Deletes an item from a Redis list. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the list. - **value** (string) - Required - Value to delete. ``` -------------------------------- ### Delete Set Data In Redis Set Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Deletes specified items from a Redis set. Requires a Redis connection object, the set name, and one or more items to delete. ```APIDOC ## Delete Set Data In Redis Set ### Description Delete set of item from set. If you need to delete set from redis use 'Delete From Redis' keyword. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **set_name** (string) - Required - Set name as key in redis - **args** (list) - Required - Item that you need to delete from set ### Example Delete Set Data In Redis Set | ${redis_conn} | Fruit | Banana | Orage ``` -------------------------------- ### Delete Item From List Redis Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Deletes an item from a list at a specific index. Optionally compares the item at that index with a provided value before deletion. ```APIDOC ## Delete Item From List Redis ### Description Delete data from list by specific index. ### Arguments - **redis_conn** (object) - Required - Redis connection object - **list_name** (string) - Required - List name as key in redis - **index** (integer) - Required - Index in list that you need to delete - **item** (string) - Optional - Compare item. If it is None, keyword will not compare with item in index. But if is not None, keyword will compare it with item in index before delete. If not matched keyword will failed. ### Example 1 Delete Item From List Redis | ${redis_conn} | Country | 2 ### Example 2 Delete Item From List Redis | ${redis_conn} | Country | 2 | Spain ``` -------------------------------- ### Delete From Redis Hash Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Deletes a field from a Redis hash. ```APIDOC ## Delete From Redis Hash ### Description Deletes a field from a Redis hash. ### Method Keyword ### Parameters - **redis_conn** (object) - Required - Redis connection object. - **key** (string) - Required - Key of the hash. - **field** (string) - Required - Field to delete. ``` -------------------------------- ### Delete From Redis Hash Source: https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html Deletes a specific key from a hash stored in Redis. ```robotframework Delete From Redis Hash | ${redis_conn} | HASHNAME | KEY ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.