return self

def __str__(self):
    return 'http://' + self.domain + '/' + self.path + '?' + self.params

def build(self):
    return self.__str__()
if __name__ == '__main__':
    u = UrlBuilder('www.example.com')
print(u.withPath('bobloblaw'))
print(u.withParams('lawyer=yes'))
print(u.withPath('elvis').withParams('theking=true'))
построитель URL для python