#NEWLINE# def reset_account_apikey( conn , id ) : #NEWLINE# #INDENT# with conn . begin ( ) : #NEWLINE# #INDENT# update_stmt = schema . account . update ( ) . where ( ( schema . account . c . id == id ) ) #NEWLINE# update_stmt = update_stmt . values ( apikey = generate_api_key ( ) ) #NEWLINE# conn . execute ( update_stmt ) #NEWLINE# #UNINDENT# logger . debug ( 'Reset API key for account %r' , id )