MCPcopy
hub / github.com/redis/redis-py / _server_xxh3_digest

Method _server_xxh3_digest

tests/test_asyncio/test_commands.py:1375–1381  ·  view source on GitHub ↗

Get the server-computed XXH3 hex digest for the key's value. Requires the DIGEST command implemented on the server.

(self, r, key)

Source from the content-addressed store, hash-verified

1373 return x.decode("ascii") if isinstance(x, (bytes, bytearray)) else x
1374
1375 async def _server_xxh3_digest(self, r, key):
1376 """
1377 Get the server-computed XXH3 hex digest for the key's value.
1378 Requires the DIGEST command implemented on the server.
1379 """
1380 d = await r.execute_command("DIGEST", key)
1381 return None if d is None else self._ensure_str(d).lower()
1382
1383 @skip_if_server_version_lt("8.3.224")
1384 async def test_delex_nonexistent(self, r):

Callers 2

Calls 2

_ensure_strMethod · 0.95
execute_commandMethod · 0.45

Tested by

no test coverage detected