Render the final URL based on available variables

def render_url(self):
        """
        Render the final URL based on available variables
        """
        url = self.url.format(**self.replacements)
        if self.params:
            return url + '?' + urlencode(self.params)
        return url