Hello everybody:
I'm trying to write a Python code that mixing coroutines and
generator, but I don't know if this make sense. Here the example:
async def load_previous_data(redis: aioredis.Redis,
channel: str,
count: int = 20):
result = await redis.xrange(channel, count=count, stop="+")
key, values_raw = result[0]
for k, v in values_raw.items():
yield k.decode("UTF-8"): v.decode("UTF-8")
Could anybody help me?
Thanks in advance
--
Daniel García a.k.a. cr0hn - Security researcher and pentester
@ggdaniel
http://www.cr0hn.com/me/