Hash

HDEL

Deletes one or more hash fields.

Arguments

keybodystrrequired

The key to get.

fieldsbody*List[str]required

One or more fields to delete.

Response

intrequired

The number of fields that were removed from the hash.

Example
redis.hset("myhash", "field1", "Hello")redis.hset("myhash", "field2", "World")assert redis.hdel("myhash", "field1", "field2") == 2
Loading search…