arthurai.client.helper.construct_url#
- arthurai.client.helper.construct_url(*parts, validate=True, default_https=True)#
Construct a url from various parts
Useful for joining pieces which may or may not have leading and/or trailing slashes. e.g. construct_url(”http://arthur.ai/”, “/api/v3”, “/users”) will yield the same valid url as construct_url(”http://arthur.ai”, “api/v3/”, “users/”).
- Parameters
validate – if True, validate that the URL is valid
default_https – if True, allow urls without a scheme and use https by default
parts (
str
) – strings from which to construct the url
- Return type
str
- Returns
a fully joined url