@user.setter
def user(self, value):
    if isinstance(value, str):
        self._user = urlparse.quote(value)
    else:
        self._user = value
@user.setter
def user(self, value):
    if isinstance(value, str):
        self._user = urlparse.quote(value)
    else:
        self._user = value