GetterSetter

Getter - Setter using property in python

class UploadFile:
    def _get_name(self):
        return self._name

    def _set_name(self, name):
        # Sanitize the file name so that it can't be dangerous.
        self._name = name

    name = property(_get_name, _set_name)