I am trying to switch from the official redis python package (redis-py
) to the async equivalent aioredis-py
package.
I currently connect using the official package with:
import redis
redis_client = redis.Redis(
host="abc",
port=6380,
password="def",
ssl=True,
)
redis_client.ping() # returns True as expected
I am currently getting a connection reset by peer when trying to replicate this with aioredis
:
async def main():
#uri_template = redis://{password}@{redis_service_name}.redis.cache.windows.net:{port}
redis = aioredis.from_url("redis://def@abc.redis.cache.windows.net:6380")
return await redis.ping()
res = asyncio.run(main())
I get a ConnectionResetError
Am I doing something wrong?