compass.utilities.url.base_website_url#

base_website_url(url)[source]#

Return the scheme and netloc portion of a website URL

Parameters:

url (str) – URL string that may include a path, query string, or fragment.

Returns:

str – Canonical website root URL consisting of the original scheme and netloc with a trailing slash. If the URL is missing a scheme or netloc, the input is returned unchanged.