rds_test.py 104 B

1234
  1. import redis
  2. r = redis.Redis(host='db.ptt.cx', port=6379, db=1)
  3. r.set('foo', 'bar')
  4. print(r.get('foo'))