Skip to main content

Documentation Index

Fetch the complete documentation index at: https://upstash.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

If the hash field does not exist, it is set to 0 before performing the operation.

Arguments

key
str
required
The key of the hash.
field
str
required
The field to increment
increment
int
How much to increment the field by. Can be negative to subtract.

Response

The new value of the field after the increment.
redis.hset("myhash", "field1", 5)

assert redis.hincrby("myhash", "field1", 10) == 15