-
Notifications
You must be signed in to change notification settings - Fork 0
/
client.py
42 lines (41 loc) · 1016 Bytes
/
client.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import redis5
r = redis5.Redis(db=1,host='85.208.253.188')
#r.set("hello","reza")
#print(r.get("hello"))
#print(r.delete("hello"))
#r.set('name', 'reza') # True
#r.db.delete("hello",True)
#r.incr("countr")
r.decr("countr")
#r.delete("hello")
#r.flush()
# value = r.get('hello')
# print(value) # 'world'
# r.delete('hello') # True
# print(r.get('hello')) # None
#print(r.list_keys())
#print(r.add_key('reza','reza'))
#print(r.rpush('RR',"[1,2,3,5,5]"))
#print(r.lpush('RR','BR'))
#print(r.lpush('RR','r'))
#print(r.lpush('RR','3'))
#print(r.lpush('RR','33'))
#print(r.lpush('RR','35'))
#print(r.lpop('RR'))
#print(r.rpop('RR'))
##print(r.llen('RR'))
# print(r.lindex('RR',3))
#print(r.lrange('RR',2))
#print(r.rpush('RR',2))
#print(r.expire('RR',20))
#print(r.ttl('RR'))
#print(r.type('R'))
#print(r.sort('RR'))
#print(r.hset('BB',"Br",11))
#print(r.hset('BB',"Brr",12))
#print(r.hget('BB'))
#print(r.hgetall('BB'))
#print(r.hexists('BB',11))
#print(r.hdel('BB',"Br"))
#print(r.hvals('BB'))
print(r.hmget('BB','Br'))