def password(self, password):
        """ Encode a string and set as password """
        from boiler.user.util.passlib import passlib_context
        password = str(password)
        encrypted = passlib_context.encrypt(password)
        self._password = encrypted
Encode a string and set as password