init_poolmanager() — requests Function Reference
Architecture documentation for the init_poolmanager() function in adapters.py from the requests codebase.
Entity Profile
Dependency Diagram
graph TD ae70d91c_f99f_b4f2_d044_c4472b35bbe0["init_poolmanager()"] 5fdf5d52_8295_768a_e20f_c6cefb721b91["HTTPAdapter"] ae70d91c_f99f_b4f2_d044_c4472b35bbe0 -->|defined in| 5fdf5d52_8295_768a_e20f_c6cefb721b91 22d5de8c_9d85_20f5_c3fb_f4c08e8c2ef8["__init__()"] 22d5de8c_9d85_20f5_c3fb_f4c08e8c2ef8 -->|calls| ae70d91c_f99f_b4f2_d044_c4472b35bbe0 216aa9d4_1168_8f0b_3016_d617765a2194["__setstate__()"] 216aa9d4_1168_8f0b_3016_d617765a2194 -->|calls| ae70d91c_f99f_b4f2_d044_c4472b35bbe0 style ae70d91c_f99f_b4f2_d044_c4472b35bbe0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/requests/adapters.py lines 218–242
def init_poolmanager(
self, connections, maxsize, block=DEFAULT_POOLBLOCK, **pool_kwargs
):
"""Initializes a urllib3 PoolManager.
This method should not be called from user code, and is only
exposed for use when subclassing the
:class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
:param connections: The number of urllib3 connection pools to cache.
:param maxsize: The maximum number of connections to save in the pool.
:param block: Block when no free connections are available.
:param pool_kwargs: Extra keyword arguments used to initialize the Pool Manager.
"""
# save these values for pickling
self._pool_connections = connections
self._pool_maxsize = maxsize
self._pool_block = block
self.poolmanager = PoolManager(
num_pools=connections,
maxsize=maxsize,
block=block,
**pool_kwargs,
)
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does init_poolmanager() do?
init_poolmanager() is a function in the requests codebase, defined in src/requests/adapters.py.
Where is init_poolmanager() defined?
init_poolmanager() is defined in src/requests/adapters.py at line 218.
What calls init_poolmanager()?
init_poolmanager() is called by 2 function(s): __init__, __setstate__.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free