import redis import json tag_key = "meigou_check_in_tag_ids" T1 = [85,86,87,5057,88,89,101,102,777,780,95,890,2923,844,258,912,914,1324,2108,2935,5063, 185,915,916,2936,2937,2938,5064,188,775,824,1703,2939,3041,3049,5067,5068,180,187, 246,821,825,1966,2072,5065,2060,2778,2941,5066,835,828,830,831,832,833,834,918,919,5069,36,171, 181,2065,2066,2067,2068,2948,6160,2450,917,2455,5070,2459,2460,822,872,873,926,928,2063,2866,5072, 199,200,201,202,203,204,205,206,207,243,244,787,930,931,1801,2352,5073,97,99,115,121,123,137,141, 152,197,776,804,868,885,954,5074,117,237,842,5077,778,782,783,784,785,788,789,2946,3043,2059,4437,98,114,120,125,135,136,140,153,793,805,886,1890,15,17,19,975,72,34,35,41,47,1387,1992,2942,2663,154,155,157,852,61,79,1055,2033,3042,3044,6147,2112] # r = redis.StrictRedis.from_url('redis://:ReDis!GmTx*0aN6@172.16.40.133:6379') r = redis.StrictRedis.from_url("redis://redis.paas-test.env:6379/0") # r.set(tag_key,json.dumps(T1)) a = eval(r.get(tag_key)) print(a)