Utils Module

Misc utilities.

author

Doug Skrypa

requests_client.utils.format_path_prefix(value)[source]
requests_client.utils.proxy_bypass_append(host)[source]

Adds the given host to os.environ[‘no_proxy’] if it was not already present. This environment variable is used by the Requests library to disable proxies for requests to particular hosts.

Parameters

host (str) – A host to add to os.environ[‘no_proxy’]

requests_client.utils.rate_limited(interval=0, log_lvl=10)[source]
Parameters
  • interval (float) – Interval between allowed invocations in seconds

  • log_lvl (int) – The log level that should be used to indicate that the wrapped function is being delayed