Check URLs str) bool

A function which checks whether a url exists on a remote server (i.e., does not return a 404 or similar error code).


url – the URL on the remote server.


boolean, true is url exists

Access HTTP APIs Response, url: str) bool

Check the HTTP response and raise an exception with appropriate error message if request was not successful.

  • response

  • url

Returns str, data: Optional[Dict] = None, api_key: Optional[str] = None, convert_to_json: bool = True, header_data: Optional[Dict] = None) Dict

A function which sends a http request with a json data packet. If an error occurs an exception will be raised.

  • url – The URL for the request to be sent.

  • data – dictionary of data which can be converted to str using json.dumps.

  • api_key – if provided then the api-key will be provided via the http header.

  • convert_to_json

  • header_data – a dict of header information.


A dict of data returned from the server.

Download Data str, out_file_path: str, username: Optional[str] = None, password: Optional[str] = None, no_except: bool = True)
  • input_url

  • out_file_path

  • username

  • password

Returns str, out_file_path: str, username: ~typing.Optional[str] = None, password: ~typing.Optional[str] = None, try_number: int = 10, time_out: int = 60, input_url_md5: ~typing.Optional[str] = None) -> (<class 'bool'>, <class 'str'>)

A function which downloads a file from a url using the wget command line tool. If a username or password are provided then both must be provided.

  • input_url_md5

  • input_url – string with the URL to be downloaded.

  • out_file_path – output file name and path.

  • username – username for the download, if required. Default is None meaning it will be ignored.

  • password – password for the download, if required. Default is None meaning it will be ignored.

  • try_number – number of attempts at the download. Default is 10.

  • time_out – number of seconds to time out Default is 60.


boolean specifying whether the file had been successfully downloaded and a string with user feedback (e.g., error message)