prepare_hooks() — requests Function Reference
Architecture documentation for the prepare_hooks() function in models.py from the requests codebase.
Entity Profile
Dependency Diagram
graph TD a3ee9d20_5f94_9ee9_4c40_009b9b7e5597["prepare_hooks()"] c8cfcd0c_a36a_3124_6cd4_1516b06c63b3["PreparedRequest"] a3ee9d20_5f94_9ee9_4c40_009b9b7e5597 -->|defined in| c8cfcd0c_a36a_3124_6cd4_1516b06c63b3 3fc6c343_3d70_670f_636f_1fcab0f8a681["prepare()"] 3fc6c343_3d70_670f_636f_1fcab0f8a681 -->|calls| a3ee9d20_5f94_9ee9_4c40_009b9b7e5597 744a2df0_df78_c759_c800_b42f7399cee7["register_hook()"] a3ee9d20_5f94_9ee9_4c40_009b9b7e5597 -->|calls| 744a2df0_df78_c759_c800_b42f7399cee7 style a3ee9d20_5f94_9ee9_4c40_009b9b7e5597 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/requests/models.py lines 632–639
def prepare_hooks(self, hooks):
"""Prepares the given hooks."""
# hooks can be passed as None to the prepare method and to this
# method. To prevent iterating over None, simply use an empty list
# if hooks is False-y
hooks = hooks or []
for event in hooks:
self.register_hook(event, hooks[event])
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does prepare_hooks() do?
prepare_hooks() is a function in the requests codebase, defined in src/requests/models.py.
Where is prepare_hooks() defined?
prepare_hooks() is defined in src/requests/models.py at line 632.
What does prepare_hooks() call?
prepare_hooks() calls 1 function(s): register_hook.
What calls prepare_hooks()?
prepare_hooks() is called by 1 function(s): prepare.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free