README.md 437 B

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