Home / Function/ copy() — requests Function Reference

copy() — requests Function Reference

Architecture documentation for the copy() function in cookies.py from the requests codebase.

Function python CoreAPI VerbHandlers calls 2 called by 4

Entity Profile

Dependency Diagram

graph TD
  9e1359c1_1379_2078_a638_b914c03e4f63["copy()"]
  12ccbc5f_4c31_987c_5272_7babba58a1f2["RequestsCookieJar"]
  9e1359c1_1379_2078_a638_b914c03e4f63 -->|defined in| 12ccbc5f_4c31_987c_5272_7babba58a1f2
  351a1e00_cb4e_af8e_1ed9_e33664efe05e["handle_401()"]
  351a1e00_cb4e_af8e_1ed9_e33664efe05e -->|calls| 9e1359c1_1379_2078_a638_b914c03e4f63
  0aace64c_6424_62be_3052_5ea0e8ae90d3["update()"]
  0aace64c_6424_62be_3052_5ea0e8ae90d3 -->|calls| 9e1359c1_1379_2078_a638_b914c03e4f63
  c295ff97_ef76_564c_b442_862c4fedc3a3["__getstate__()"]
  c295ff97_ef76_564c_b442_862c4fedc3a3 -->|calls| 9e1359c1_1379_2078_a638_b914c03e4f63
  6ddea2af_9af3_5723_ec92_5d6215a74222["_copy_cookie_jar()"]
  6ddea2af_9af3_5723_ec92_5d6215a74222 -->|calls| 9e1359c1_1379_2078_a638_b914c03e4f63
  26674e3e_f07b_769f_c0e7_70e94087d428["get_policy()"]
  9e1359c1_1379_2078_a638_b914c03e4f63 -->|calls| 26674e3e_f07b_769f_c0e7_70e94087d428
  0aace64c_6424_62be_3052_5ea0e8ae90d3["update()"]
  9e1359c1_1379_2078_a638_b914c03e4f63 -->|calls| 0aace64c_6424_62be_3052_5ea0e8ae90d3
  style 9e1359c1_1379_2078_a638_b914c03e4f63 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/requests/cookies.py lines 428–433

    def copy(self):
        """Return a copy of this RequestsCookieJar."""
        new_cj = RequestsCookieJar()
        new_cj.set_policy(self.get_policy())
        new_cj.update(self)
        return new_cj

Domain

Subdomains

Frequently Asked Questions

What does copy() do?
copy() is a function in the requests codebase, defined in src/requests/cookies.py.
Where is copy() defined?
copy() is defined in src/requests/cookies.py at line 428.
What does copy() call?
copy() calls 2 function(s): get_policy, update.
What calls copy()?
copy() is called by 4 function(s): __getstate__, _copy_cookie_jar, handle_401, update.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free