mantik.utils.urls

Functions

download_from_url(url, target_path)

Download artifacts stored at a certain url and saves them in target path.

get_local_path_from_url(→ str)

remove_double_slashes_from_path(→ str)

Ensure that a URL uses HTTPS and does not contain // in its path.

replace_first_subdomain(→ str)

Module Contents

mantik.utils.urls.download_from_url(url: str, target_path: str)[source]

Download artifacts stored at a certain url and saves them in target path.

mantik.utils.urls.get_local_path_from_url(url: str, target_dir: str, filetype: str) str[source]
mantik.utils.urls.remove_double_slashes_from_path(url: str, ensure_https: bool = True) str[source]

Ensure that a URL uses HTTPS and does not contain // in its path.

mantik.utils.urls.replace_first_subdomain(url: str, replace_with: str) str[source]