Sorted Set

ZINCRBY

Increment the score of a member.

Arguments

keybodystrrequired

The key of the sorted set.

incrementbodyintrequired

The increment to add to the score.

memberbodystrrequired

The member to increment.

Response

floatrequired

The new score of member after the increment operation.

Example
redis.zadd("myset", {"one": 1, "two": 2, "three": 3})assert redis.zincrby("myset", 2, "one") == 3
Loading search…