(key: str, value: Any, ex: Optional[float] = None)
This method sets the value for the given :param key: to the given :param value:.
    If set, the key will expire after :param ex: seconds.
This method sets the value for the given :param key: to the given :param value:.
    If set, the key will expire after :param ex: seconds.
This method sets the value for the given : param key : to the given : param value : . If set the key will expire after : param ex : seconds .
def set(key: str, value: Any, ex: Optional[float] = None) -> None:
    """This method sets the value for the given :param key: to the given :param value:.
    If set, the key will expire after :param ex: seconds."""
    redis_connection.set(key, str(value), ex=ex)
def set ( key : str , value : Any , ex : Optional [ float ] = None ) -> None : redis_connection . set ( key , str ( value ) , ex = ex )