Network operation utils

moulinette.utils.network.download_text(url, timeout=30, expected_status_code=200)[source]

Download text from a url and returns the raw text

Keyword argument:
url – The url to download the data from timeout – Number of seconds allowed for download to effectively start before giving up expected_status_code – Status code expected from the request. Can be None to ignore the status code.
moulinette.utils.network.download_json(url, timeout=30, expected_status_code=200)[source]

Download json from a url and returns the loaded json object

Keyword argument:
url – The url to download the data from timeout – Number of seconds allowed for download to effectively start before giving up