redis.sadd("src", "one", "two", "three")

redis.sadd("dest", "four")

assert redis.smove("src", "dest", "three") == True

assert redis.smembers("source") == {"one", "two"}

assert redis.smembers("destination") == {"three", "four"}

Arguments

source
str
required
The key of the set to move the member from.
destination
str
required
The key of the set to move the member to.
member
str
The members to move

Response

True if the member was moved, False if it was not.
redis.sadd("src", "one", "two", "three")

redis.sadd("dest", "four")

assert redis.smove("src", "dest", "three") == True

assert redis.smembers("source") == {"one", "two"}

assert redis.smembers("destination") == {"three", "four"}