9951 explained code solutions for 126 technologies


python-redisHow to check Redis connection


import redis
r = redis.from_url('redis://localhost:6379')
print(r.ping())ctrl + c
import redis

import Redis module

redis.from_url

connect to Redis server using URI

r.ping()

pings Redis server (will return True on success)