/snap/core24/1643/usr/lib/python3/dist-packages/requests
NameSizeModeActions
__pycache__/-0755rm
adapters.py195530644editdlrm
api.py64490644editdlrm
auth.py101870644editdlrm
certs.py4290644editdlrm
compat.py13800644editdlrm
cookies.py185600644editdlrm
exceptions.py38110644editdlrm
help.py38060644editdlrm
hooks.py7330644editdlrm
models.py352230644editdlrm
packages.py7770644editdlrm
sessions.py303730644editdlrm
status_codes.py42350644editdlrm
structures.py29120644editdlrm
utils.py331770644editdlrm
_internal_utils.py14950644editdlrm
__init__.py48570644editdlrm
__version__.py4350644editdlrm
Edit: /snap/core24/1643/usr/lib/python3/dist-packages/requests/hooks.py (733B)
""" requests.hooks ~~~~~~~~~~~~~~ This module provides the capabilities for the Requests hooks system. Available hooks: ``response``: The response generated from a Request. """ HOOKS = ["response"] def default_hooks(): return {event: [] for event in HOOKS} # TODO: response is the only one def dispatch_hook(key, hooks, hook_data, **kwargs): """Dispatches a hook dictionary on a given piece of data.""" hooks = hooks or {} hooks = hooks.get(key) if hooks: if hasattr(hooks, "__call__"): hooks = [hooks] for hook in hooks: _hook_data = hook(hook_data, **kwargs) if _hook_data is not None: hook_data = _hook_data return hook_data