BaseAdapter Class — requests Architecture
Architecture documentation for the BaseAdapter class in adapters.py from the requests codebase.
Entity Profile
Dependency Diagram
graph TD 3115448a_c02d_7a97_aab5_38326ba6f5ae["BaseAdapter"] 8cafec3a_816a_3b74_357a_0167321e5d19["adapters.py"] 3115448a_c02d_7a97_aab5_38326ba6f5ae -->|defined in| 8cafec3a_816a_3b74_357a_0167321e5d19 aeefb7d1_8d82_cc10_0dae_1618c6f4c10d["__init__()"] 3115448a_c02d_7a97_aab5_38326ba6f5ae -->|method| aeefb7d1_8d82_cc10_0dae_1618c6f4c10d 8afca6fd_1e23_31a7_341a_2a812103180b["send()"] 3115448a_c02d_7a97_aab5_38326ba6f5ae -->|method| 8afca6fd_1e23_31a7_341a_2a812103180b 7088e27c_37da_4173_e744_36611a384946["close()"] 3115448a_c02d_7a97_aab5_38326ba6f5ae -->|method| 7088e27c_37da_4173_e744_36611a384946
Relationship Graph
Source Code
src/requests/adapters.py lines 115–142
class BaseAdapter:
"""The Base Transport Adapter"""
def __init__(self):
super().__init__()
def send(
self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None
):
"""Sends PreparedRequest object. Returns Response object.
:param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
:param stream: (optional) Whether to stream the request content.
:param timeout: (optional) How long to wait for the server to send
data before giving up, as a float, or a :ref:`(connect timeout,
read timeout) <timeouts>` tuple.
:type timeout: float or tuple
:param verify: (optional) Either a boolean, in which case it controls whether we verify
the server's TLS certificate, or a string, in which case it must be a path
to a CA bundle to use
:param cert: (optional) Any user-provided SSL certificate to be trusted.
:param proxies: (optional) The proxies dictionary to apply to the request.
"""
raise NotImplementedError
def close(self):
"""Cleans up adapter specific items."""
raise NotImplementedError
Domain
Defined In
Source
Frequently Asked Questions
What is the BaseAdapter class?
BaseAdapter is a class in the requests codebase, defined in src/requests/adapters.py.
Where is BaseAdapter defined?
BaseAdapter is defined in src/requests/adapters.py at line 115.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free