Init Commit

This commit is contained in:
2026-01-17 15:58:06 +03:30
commit b6ad4d18be
6 changed files with 397 additions and 0 deletions

22
Codes/redis_test.py Normal file
View File

@@ -0,0 +1,22 @@
import redis
method=int(input("Enter Method: (1.Read/2.Write): "))
r = redis.Redis(host="192.168.6.160", port=6379,db=0)
if (method == 1):
key=str(input("enter key name: "))
value=r.get(key)
if value == None:
print("Undefined Key")
exit
else:
print(value.decode('utf-8'))
elif (method == 2):
key=str(input("enter key name: "))
value=str(input("enter value: "))
r.set(key,value)
else:
print("Incorrect Input")
exit