prepare() — requests Function Reference
Architecture documentation for the prepare() function in models.py from the requests codebase.
Entity Profile
Dependency Diagram
graph TD 2b8e3c1b_1e51_43b6_6d22_360c4395b029["prepare()"] 075eaa90_3b36_3d32_fc50_b57c7c8fe638["Request"] 2b8e3c1b_1e51_43b6_6d22_360c4395b029 -->|defined in| 075eaa90_3b36_3d32_fc50_b57c7c8fe638 3fc6c343_3d70_670f_636f_1fcab0f8a681["prepare()"] 3fc6c343_3d70_670f_636f_1fcab0f8a681 -->|calls| 2b8e3c1b_1e51_43b6_6d22_360c4395b029 3fc6c343_3d70_670f_636f_1fcab0f8a681["prepare()"] 2b8e3c1b_1e51_43b6_6d22_360c4395b029 -->|calls| 3fc6c343_3d70_670f_636f_1fcab0f8a681 style 2b8e3c1b_1e51_43b6_6d22_360c4395b029 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/requests/models.py lines 297–312
def prepare(self):
"""Constructs a :class:`PreparedRequest <PreparedRequest>` for transmission and returns it."""
p = PreparedRequest()
p.prepare(
method=self.method,
url=self.url,
headers=self.headers,
files=self.files,
data=self.data,
json=self.json,
params=self.params,
auth=self.auth,
cookies=self.cookies,
hooks=self.hooks,
)
return p
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does prepare() do?
prepare() is a function in the requests codebase, defined in src/requests/models.py.
Where is prepare() defined?
prepare() is defined in src/requests/models.py at line 297.
What does prepare() call?
prepare() calls 1 function(s): prepare.
What calls prepare()?
prepare() 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