String

MGET

Load multiple keys from Redis in one go.

For billing purposes, this counts as a single command.

Arguments

keysbody*List[str]required

Multiple keys to load from Redis.

Response

List[str]required

An array of values corresponding to the keys passed in. If a key doesn't exist, the value will be None.

Example
redis.set("key1", "value1")redis.set("key2", "value2")assert redis.mget("key1", "key2") == ["value1", "value2"]
Loading search…