This document is for Kombu's development version, which can be significantly different from previous releases. Get the stable docs here: 5.0.

URL Utilities - kombu.utils.url

URL Utilities.

kombu.utils.url.as_url(scheme, host=None, port=None, user=None, password=None, path=None, query=None, sanitize=False, mask='**')[source]

Generate URL from component parts.

kombu.utils.url.maybe_sanitize_url(url, mask='**')[source]

Sanitize url, or do nothing if url undefined.


Given the query parameter for ssl_cert_reqs, return the SSL constant or None.


Parse URL into mapping of components.

kombu.utils.url.sanitize_url(url, mask='**')[source]

Return copy of URL with password removed.


Parse URL into urlparts tuple of components.

class kombu.utils.url.urlparts(scheme: str, hostname: str, port: int, username: str, password: str, path: str, query: Mapping)[source]

Named tuple representing parts of the URL.

property hostname

Alias for field number 1

property password

Alias for field number 4

property path

Alias for field number 5

property port

Alias for field number 2

property query

Alias for field number 6

property scheme

Alias for field number 0

property username

Alias for field number 3