#NEWLINE# @ classmethod #NEWLINE# def _from_thing( cls , thing , value ) : #NEWLINE# #INDENT# assert ( thing in ( 'id' , 'username_lower' , 'session_token' , 'api_key' ) ) #NEWLINE# return cls . db . one ( '\n\n            SELECT participants.*::participants\n              FROM participants\n             WHERE {}=%s\n\n        ' . format ( thing ) , ( value , ) )