Home / Function/ seek() — requests Function Reference

seek() — requests Function Reference

Architecture documentation for the seek() function in test_requests.py from the requests codebase.

Function python CoreAPI SessionLifecycle calls 1 called by 3

Entity Profile

Dependency Diagram

graph TD
  55441dc1_36b2_4d2b_bb99_c396f5c2ff8d["seek()"]
  7504ff45_daa4_e0a8_8c39_aa4f2fd4e19f["TestStream"]
  55441dc1_36b2_4d2b_bb99_c396f5c2ff8d -->|defined in| 7504ff45_daa4_e0a8_8c39_aa4f2fd4e19f
  3a0cc21b_3207_b51a_9fc0_d5da88c821f8["seek()"]
  3a0cc21b_3207_b51a_9fc0_d5da88c821f8 -->|calls| 55441dc1_36b2_4d2b_bb99_c396f5c2ff8d
  4ec824ee_a014_6c1d_d8f4_5a3c2f0f0215["test_POSTBIN_SEEKED_OBJECT_WITH_NO_ITER()"]
  4ec824ee_a014_6c1d_d8f4_5a3c2f0f0215 -->|calls| 55441dc1_36b2_4d2b_bb99_c396f5c2ff8d
  614bec73_7070_9883_cbd0_8909e0af424d["test_rewind_body_failed_seek()"]
  614bec73_7070_9883_cbd0_8909e0af424d -->|calls| 55441dc1_36b2_4d2b_bb99_c396f5c2ff8d
  3a0cc21b_3207_b51a_9fc0_d5da88c821f8["seek()"]
  55441dc1_36b2_4d2b_bb99_c396f5c2ff8d -->|calls| 3a0cc21b_3207_b51a_9fc0_d5da88c821f8
  style 55441dc1_36b2_4d2b_bb99_c396f5c2ff8d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_requests.py lines 855–861

            def seek(self, offset, where=0):
                if where == 0:
                    self.index = offset
                elif where == 1:
                    self.index += offset
                elif where == 2:
                    self.index = self.length + offset

Domain

Subdomains

Calls

Frequently Asked Questions

What does seek() do?
seek() is a function in the requests codebase, defined in tests/test_requests.py.
Where is seek() defined?
seek() is defined in tests/test_requests.py at line 855.
What does seek() call?
seek() calls 1 function(s): seek.
What calls seek()?
seek() is called by 3 function(s): seek, test_POSTBIN_SEEKED_OBJECT_WITH_NO_ITER, test_rewind_body_failed_seek.

Analyze Your Own Codebase

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

Try Supermodel Free