python redis.StrictRedis.from_url 连接redis

python redis.StrictRedis.from_url 连接redis
用url的方式连接redis
 
r=redis.StrictRedis.from_url(url)
 
url为以下的格式:
 
redis://[:password]@localhost:6379/0
rediss://[:password]@localhost:6379/0
unix://[:password]@/path/to/socket.sock?db=0

 原创文章,转载请注明出处:
http://30daydo.com/article/527
 

0 个评论

要回复文章请先登录注册