geotribu_cli.utils.url_helpers module

Helpers to check file: readable, exists, etc..

Author: Julien Moura (

geotribu_cli.utils.url_helpers.check_str_is_url(input_str, ref_shemes=('http', 'https'), raise_error=True)

Checks if a given str is a valid URL.

  • input_str (str) – The input str to check.

  • ref_schemes (tuple, optional) – The reference schemes for valid URLs. By default, it includes (« http », « https »).

  • raise_error (bool, optional) – Indicates whether an exception should be raised for invalid str. Default is True.


True if the str is a valid URL, False otherwise.

Type renvoyé:


  • ValueError – If the str is not a valid URL and raise_error is True.

  • TypeError – If an error occurs during str checking and raise_error is True.