implementation of python userrole api