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

Function get_stream_message

tests/test_commands.py:68–72  ·  view source on GitHub ↗

Fetch a stream message and format it as a (message_id, fields) pair

(client, stream, message_id)

Source from the content-addressed store, hash-verified

66
67
68def get_stream_message(client, stream, message_id):
69 "Fetch a stream message and format it as a (message_id, fields) pair"
70 response = client.xrange(stream, min=message_id, max=message_id)
71 assert len(response) == 1
72 return response[0]
73
74
75# RESPONSE CALLBACKS

Calls 1

xrangeMethod · 0.80

Tested by

no test coverage detected