adapters.py — requests Source File
Architecture documentation for adapters.py, a python file in the requests codebase. 37 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 8cafec3a_816a_3b74_357a_0167321e5d19["adapters.py"] d7a739b0_e73b_9565_f5ed_5e8c24943504["auth.py"] 8cafec3a_816a_3b74_357a_0167321e5d19 --> d7a739b0_e73b_9565_f5ed_5e8c24943504 fa72bb6a_120a_ce88_fe4e_28d8c4d3b882["_basic_auth_str"] 8cafec3a_816a_3b74_357a_0167321e5d19 --> fa72bb6a_120a_ce88_fe4e_28d8c4d3b882 655589d9_9504_8132_6277_d047dcd65486["compat.py"] 8cafec3a_816a_3b74_357a_0167321e5d19 --> 655589d9_9504_8132_6277_d047dcd65486 270696ff_2a4f_ef5b_92e8_33a79e68a2d8["cookies.py"] 8cafec3a_816a_3b74_357a_0167321e5d19 --> 270696ff_2a4f_ef5b_92e8_33a79e68a2d8 55052edd_2a43_f298_b8d3_9fb1f2641e84["extract_cookies_to_jar"] 8cafec3a_816a_3b74_357a_0167321e5d19 --> 55052edd_2a43_f298_b8d3_9fb1f2641e84 f4a2f4ac_0336_89fc_eb3c_2c88c34f05a8["exceptions.py"] 8cafec3a_816a_3b74_357a_0167321e5d19 --> f4a2f4ac_0336_89fc_eb3c_2c88c34f05a8 6d0b23d4_0fe8_9017_3d1a_9c023311c6a7["ConnectionError"] 8cafec3a_816a_3b74_357a_0167321e5d19 --> 6d0b23d4_0fe8_9017_3d1a_9c023311c6a7 bd878dec_861a_9f45_52bf_c4449c3b8783["ConnectTimeout"] 8cafec3a_816a_3b74_357a_0167321e5d19 --> bd878dec_861a_9f45_52bf_c4449c3b8783 5f5c4495_052d_a9c8_2212_6ab9998c0ab5["InvalidHeader"] 8cafec3a_816a_3b74_357a_0167321e5d19 --> 5f5c4495_052d_a9c8_2212_6ab9998c0ab5 a97e2627_84b9_6952_72a0_d90b0f9f72de["InvalidProxyURL"] 8cafec3a_816a_3b74_357a_0167321e5d19 --> a97e2627_84b9_6952_72a0_d90b0f9f72de d90eff61_6e77_f0f3_f984_7d1f9de2661a["InvalidSchema"] 8cafec3a_816a_3b74_357a_0167321e5d19 --> d90eff61_6e77_f0f3_f984_7d1f9de2661a b50a24e0_eb72_4e23_66de_6c500b639532["InvalidURL"] 8cafec3a_816a_3b74_357a_0167321e5d19 --> b50a24e0_eb72_4e23_66de_6c500b639532 65d2dd82_e753_b9d1_adf3_5ea1bae628b1["ProxyError"] 8cafec3a_816a_3b74_357a_0167321e5d19 --> 65d2dd82_e753_b9d1_adf3_5ea1bae628b1 59c2b04d_4b60_fccb_b149_a32c81e1d627["ReadTimeout"] 8cafec3a_816a_3b74_357a_0167321e5d19 --> 59c2b04d_4b60_fccb_b149_a32c81e1d627 style 8cafec3a_816a_3b74_357a_0167321e5d19 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"""
requests.adapters
~~~~~~~~~~~~~~~~~
This module contains the transport adapters that Requests uses to define
and maintain connections.
"""
import os.path
import socket # noqa: F401
import typing
import warnings
from urllib3.exceptions import (
ClosedPoolError,
ConnectTimeoutError,
LocationValueError,
MaxRetryError,
NewConnectionError,
ProtocolError,
ReadTimeoutError,
ResponseError,
)
from urllib3.exceptions import HTTPError as _HTTPError
from urllib3.exceptions import InvalidHeader as _InvalidHeader
from urllib3.exceptions import ProxyError as _ProxyError
from urllib3.exceptions import SSLError as _SSLError
from urllib3.poolmanager import PoolManager, proxy_from_url
from urllib3.util import Timeout as TimeoutSauce
from urllib3.util import parse_url
from urllib3.util.retry import Retry
from .auth import _basic_auth_str
from .compat import basestring, urlparse
from .cookies import extract_cookies_to_jar
from .exceptions import (
ConnectionError,
ConnectTimeout,
InvalidHeader,
InvalidProxyURL,
InvalidSchema,
InvalidURL,
ProxyError,
ReadTimeout,
RetryError,
SSLError,
)
from .models import Response
from .structures import CaseInsensitiveDict
from .utils import (
DEFAULT_CA_BUNDLE_PATH,
extract_zipped_paths,
get_auth_from_url,
get_encoding_from_headers,
prepend_scheme_if_needed,
select_proxy,
urldefragauth,
)
try:
// ... (639 more lines)
Domain
Subdomains
Classes
Dependencies
- CaseInsensitiveDict
- ConnectTimeout
- ConnectionError
- InvalidHeader
- InvalidProxyURL
- InvalidSchema
- InvalidURL
- PreparedRequest
- ProxyError
- ReadTimeout
- Response
- RetryError
- SSLError
- _basic_auth_str
- auth.py
- compat.py
- cookies.py
- exceptions.py
- extract_cookies_to_jar
- extract_zipped_paths
- get_auth_from_url
- get_encoding_from_headers
- models.py
- os.path
- prepend_scheme_if_needed
- select_proxy
- socket
- structures.py
- typing
- urldefragauth
- urllib3.contrib.socks
- urllib3.exceptions
- urllib3.poolmanager
- urllib3.util
- urllib3.util.retry
- utils.py
- warnings
Imported By
Source
Frequently Asked Questions
What does adapters.py do?
adapters.py is a source file in the requests codebase, written in python. It belongs to the CoreAPI domain, VerbHandlers subdomain.
What functions are defined in adapters.py?
adapters.py defines 4 function(s): SOCKSProxyManager, _urllib3_request_context, models, urllib3.
What does adapters.py depend on?
adapters.py imports 37 module(s): CaseInsensitiveDict, ConnectTimeout, ConnectionError, InvalidHeader, InvalidProxyURL, InvalidSchema, InvalidURL, PreparedRequest, and 29 more.
What files import adapters.py?
adapters.py is imported by 1 file(s): sessions.py.
Where is adapters.py in the architecture?
adapters.py is located at src/requests/adapters.py (domain: CoreAPI, subdomain: VerbHandlers, directory: src/requests).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free