===================================================================== --- New Scripts -------------------------- zsh ) amazon EKS - aws/eks/login --- Changes ------------------------------ - moved global .config to global/config.zsh - moved various global configurations to global/ --- Bug Fixes ---------------------------- - REDIS_AUTH no longer required to attempt connection - global configurations now propagate to non-zsh scripts
		
			
				
	
	
		
			16 lines
		
	
	
		
			384 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			384 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from redis import StrictRedis
 | 
						|
 | 
						|
from py.scwrypts import getenv
 | 
						|
 | 
						|
 | 
						|
class RedisClient(StrictRedis):
 | 
						|
    def __init__(self):
 | 
						|
        super().__init__(
 | 
						|
                host = getenv('REDIS_HOST'),
 | 
						|
                port = getenv('REDIS_PORT'),
 | 
						|
                password = getenv('REDIS_AUTH', required=False),
 | 
						|
                decode_responses = True,
 | 
						|
                )
 | 
						|
 | 
						|
Client = RedisClient()
 |