python redis libs
first install dep:
pip install redis
docker compose up -d
vim demo.py:
import redis
r = redis.Redis(host='localhost', port=36379, db=0, password='123456')
r.set('name', 'John')
name = r.get('name')
print(name.decode()) # Convert bytes to string
r.delete('name')
Licensed under the Apache 2.0 © liuyuqi.gov@msn.cn