Requester module


class entrezpy.requester.requester.Requester(wait, max_retries=9, init_timeout=10, timeout_max=60, timeout_step=5)

Requester implements the sendong of HTTP POST requests and the receiving of the result. It checks for request connection errors and performs retries when possible. If the maximum number of retries is reached, the request is conisdered failed. In case of connections errors, abort if the error is not due to timeout. The initial timeout is increased insteps until the maximum timeout has been reached.

  • wait (float) – wait time in seconds between requests
  • max_retries (int) – number of rertries before giving up.
  • init_timeout (int) – number of seconds before the initial request is consid considered a timeout error
  • timeout_max (int) – maximum requet timeout before giving up
  • timeout_steps (int) – increase value for timeout errors

Request the request

Parameters:req (entrezpy.base.request.EutilsRequest) – entrezpy request
run_one_request(request, monitor)

Processes one request from the queue and logs its progress.

Parameters:request (entrezpy.base.request.EutilsRequest) – single entrezpy request