Working with Redis in Python

I.What is Redis:
Redis is a NoSQL databases that is extremely fast, support caching and store value in different format.
Sometimes, if your data is uncategorized or you want to get it fast, you should think of Redis.

redis-cli -h host_name -a pass_word -c
def test_masters_slaves():
from rediscluster import RedisCluster
nodes = [{"host": f"hostname",
"port": "6379"}]
r = RedisCluster(startup_nodes=nodes, password="xxxxx", skip_full_coverage_check=True, decode_responses=u'utf-8')
all_keys = r.keys("*")
print(f"\nKeys are : {all_keys}")

A passionate automation engineer who strongly believes in “A man can do anything he wants if he puts in the work”.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store