merge_hooks(request_hooks, session_hooks)[source]

Properly merges both requests and session hooks.

This is necessary because when request_hooks == {‘response’: []}, the merge breaks Session hooks entirely.

Backport from request so we can use it in wheezy

class WoobSession[source]

Bases: Session


Constructs a PreparedRequest for transmission and returns it. The PreparedRequest has settings merged from the Request instance and those of the Session.


requestRequest instance to prepare with this session’s settings.


alias of WoobSession

class FuturesSession(executor=None, max_workers=2, max_retries=2, adapter_class=HTTPAdapter, *args, **kwargs)[source]

Bases: WoobSession

send(*args, **kwargs)[source]

Maintains the existing api for Session.send()

Used by request() and thus all of the higher level methods

If the is_async param is True, the request is processed in a thread. Otherwise, the request is processed as usual, in a blocking way.

In all cases, it will call the callback parameter and return its result when the request has been processed.


Closes all adapters and as such the session