<s> """<STR_LIT>""" <EOL> from ovs . dal . datalist import DataList <EOL> from ovs . dal . hybrids . user import User <EOL> class UserList ( object ) : <EOL> """<STR_LIT>""" <EOL> @ staticmethod <EOL> def get_user_by_username ( username ) : <EOL> """<STR_LIT>""" <EOL> users = DataList ( User , { '<STR_LIT:type>' : DataList . where_operator . AND , <EOL> '<STR_LIT>' : [ ( '<STR_LIT:username>' , DataList . operator . EQUALS , username ) ] } ) <EOL> if len ( users ) == <NUM_LIT:1> : <EOL> return users [ <NUM_LIT:0> ] <EOL> return None <EOL> @ staticmethod <EOL> def get_users ( ) : <EOL> """<STR_LIT>""" <EOL> return DataList ( User , { '<STR_LIT:type>' : DataList . where_operator . AND , <EOL> '<STR_LIT>' : [ ] } ) </s>
