1.1.2. radical.utils.contrib package

1.1.2.1. Submodules

1.1.2.2. radical.utils.contrib.urlparse25 module

radical.utils.contrib.urlparse25.urldefrag(url)[source]

Removes any existing fragment from URL.

Returns a tuple of the defragmented URL and the fragment. If the URL contained no fragments, the second element is the empty string.

radical.utils.contrib.urlparse25.urljoin(base, url, allow_fragments=True)[source]

Join a base URL and a possibly relative URL to form an absolute interpretation of the latter.

radical.utils.contrib.urlparse25.urlparse(url, scheme='', allow_fragments=True)[source]

Parse a URL into 6 components:

<scheme>://<netloc>/<path>;<params>?<query>#<fragment>

Return a 6-tuple: (scheme, netloc, path, params, query, fragment).

Note that we don’t break the components up in smaller bits (e.g. netloc is a single string) and we don’t expand % escapes.

radical.utils.contrib.urlparse25.urlsplit(url, scheme='', allow_fragments=True)[source]

Parse a URL into 5 components:

<scheme>://<netloc>/<path>?<query>#<fragment>

Return a 5-tuple: (scheme, netloc, path, query, fragment).

Note that we don’t break the components up in smaller bits (e.g. netloc is a single string) and we don’t expand % escapes.

radical.utils.contrib.urlparse25.urlunparse(data)[source]

Put a parsed URL back together again. This may result in a slightly different, but equivalent URL, if the URL that was parsed originally had redundant delimiters, e.g. a ? with an empty query (the draft states that these are equivalent).

radical.utils.contrib.urlparse25.urlunsplit(data)[source]

1.1.2.3. Module contents