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