Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
pip._vendor.requests.hooks Namespace Reference

Functions

 default_hooks ()
 
 dispatch_hook (key, hooks, hook_data, **kwargs)
 

Variables

list HOOKS = ["response"]
 

Detailed Description

requests.hooks
~~~~~~~~~~~~~~

This module provides the capabilities for the Requests hooks system.

Available hooks:

``response``:
    The response generated from a Request.

Function Documentation

◆ default_hooks()

default_hooks ( )

Definition at line 15 of file hooks.py.

15def default_hooks():
16 return {event: [] for event in HOOKS}
17
18
19# TODO: response is the only one
20
21

◆ dispatch_hook()

dispatch_hook (   key,
  hooks,
  hook_data,
**  kwargs 
)
Dispatches a hook dictionary on a given piece of data.

Definition at line 22 of file hooks.py.

22def dispatch_hook(key, hooks, hook_data, **kwargs):
23 """Dispatches a hook dictionary on a given piece of data."""
24 hooks = hooks or {}
25 hooks = hooks.get(key)
26 if hooks:
27 if hasattr(hooks, "__call__"):
28 hooks = [hooks]
29 for hook in hooks:
30 _hook_data = hook(hook_data, **kwargs)
31 if _hook_data is not None:
32 hook_data = _hook_data
33 return hook_data
for i

References i.

Variable Documentation

◆ HOOKS

list HOOKS = ["response"]

Definition at line 12 of file hooks.py.