#NEWLINE# def block_user( user , seconds , domain = 'all' ) : #NEWLINE# #INDENT# 'Manually blocks a user id for the desired number of seconds' #NEWLINE# ( _ , _ , blocking_key ) = redis_key ( user , domain ) #NEWLINE# with client . pipeline ( ) as pipe : #NEWLINE# #INDENT# pipe . set ( blocking_key , 1 ) #NEWLINE# pipe . expire ( blocking_key , seconds ) #NEWLINE# pipe . execute ( )