python redis依赖

liuyuqi-dellpc d5ed2c0a0c Automatic Commit By liuyuqi 4 months ago
README.md d5ed2c0a0c Automatic Commit By liuyuqi 4 months ago
docker-compose.yml 85e9623090 Add 'docker-compose.yml' 9 months ago

README.md

redis

python redis libs

Usage

  1. first install dep:

    pip install redis
    docker compose up -d
    
  2. 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')
    
    

License

Licensed under the Apache 2.0 © liuyuqi.gov@msn.cn