8 lines
186 B
Python
8 lines
186 B
Python
import redis
|
|
|
|
pool = redis.ConnectionPool(host='127.0.0.1', port=6379, encoding='utf8', decode_responses=True)
|
|
|
|
|
|
def get_connection():
|
|
return redis.StrictRedis(connection_pool=pool)
|