当前位置: 首页>>代码示例>>Python>>正文


Python poolmanager.PoolManager方法代码示例

本文整理汇总了Python中requests.packages.urllib3.poolmanager.PoolManager方法的典型用法代码示例。如果您正苦于以下问题:Python poolmanager.PoolManager方法的具体用法?Python poolmanager.PoolManager怎么用?Python poolmanager.PoolManager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在requests.packages.urllib3.poolmanager的用法示例。


在下文中一共展示了poolmanager.PoolManager方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: init_poolmanager

# 需要导入模块: from requests.packages.urllib3 import poolmanager [as 别名]
# 或者: from requests.packages.urllib3.poolmanager import PoolManager [as 别名]
def init_poolmanager(self, connections, maxsize, block=DEFAULT_POOLBLOCK):
        """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.
        """
        # save these values for pickling
        self._pool_connections = connections
        self._pool_maxsize = maxsize
        self._pool_block = block

        self.poolmanager = AsyncPoolManager(num_pools=connections, maxsize=maxsize, block=block)
        self.connections = [] 
开发者ID:plexinc,项目名称:plex-for-kodi,代码行数:18,代码来源:asyncadapter.py

示例2: init_poolmanager

# 需要导入模块: from requests.packages.urllib3 import poolmanager [as 别名]
# 或者: from requests.packages.urllib3.poolmanager import PoolManager [as 别名]
def init_poolmanager(self, connections, maxsize, block=False):
        self.poolmanager = PoolManager(num_pools=connections,
                                       maxsize=maxsize,
                                       block=block,
                                       ssl_version=ssl.PROTOCOL_TLSv1) 
开发者ID:moyuanz,项目名称:DevilYuan,代码行数:7,代码来源:WebTrader.py

示例3: init_poolmanager

# 需要导入模块: from requests.packages.urllib3 import poolmanager [as 别名]
# 或者: from requests.packages.urllib3.poolmanager import PoolManager [as 别名]
def init_poolmanager(self, connections, maxsize, block=False):
        self.poolmanager = PoolManager(
            num_pools=connections,
            maxsize=maxsize,
            block=block,
            ssl_version=ssl.PROTOCOL_TLSv1_2) 
开发者ID:yeti-platform,项目名称:yeti,代码行数:8,代码来源:domain_tools.py

示例4: init_poolmanager

# 需要导入模块: from requests.packages.urllib3 import poolmanager [as 别名]
# 或者: from requests.packages.urllib3.poolmanager import PoolManager [as 别名]
def init_poolmanager(self, connections, maxsize, block=False):
        self.poolmanager = PoolManager(
            num_pools=connections, maxsize=maxsize,
            block=block, assert_fingerprint=self.fingerprint) 
开发者ID:abrasive,项目名称:nxBender,代码行数:6,代码来源:nx.py

示例5: init_poolmanager

# 需要导入模块: from requests.packages.urllib3 import poolmanager [as 别名]
# 或者: from requests.packages.urllib3.poolmanager import PoolManager [as 别名]
def init_poolmanager(self, connections, maxsize, block=False):
        self.poolmanager = PoolManager(num_pools=connections,
                                       maxsize=maxsize,
                                       block=block,
                                       ssl_version=ssl.PROTOCOL_SSLv23) 
开发者ID:ibmresilient,项目名称:resilient-python-api,代码行数:7,代码来源:co3base.py

示例6: init_poolmanager

# 需要导入模块: from requests.packages.urllib3 import poolmanager [as 别名]
# 或者: from requests.packages.urllib3.poolmanager import PoolManager [as 别名]
def init_poolmanager(self, connections, maxsize, block=False):
        self.poolmanager = PoolManager(num_pools=connections,
                                       maxsize=maxsize,
                                       block=block,
                                       ssl_version=self.ssl_version) 
开发者ID:InsecurityAsso,项目名称:inshack-2018,代码行数:7,代码来源:get-request.py

示例7: init_poolmanager

# 需要导入模块: from requests.packages.urllib3 import poolmanager [as 别名]
# 或者: from requests.packages.urllib3.poolmanager import PoolManager [as 别名]
def init_poolmanager(self, connections, maxsize, block=False):
        self.poolmanager = PoolManager(num_pools=connections, maxsize=maxsize,
                                       block=block,
                                       assert_hostname=self._assert_hostname,
                                       assert_fingerprint=self._assert_fingerprint,
                                       cert_reqs=ssl.CERT_REQUIRED) 
开发者ID:pixelated,项目名称:pixelated-user-agent,代码行数:8,代码来源:tls_adapter.py

示例8: init_poolmanager

# 需要导入模块: from requests.packages.urllib3 import poolmanager [as 别名]
# 或者: from requests.packages.urllib3.poolmanager import PoolManager [as 别名]
def init_poolmanager(self, connections, maxsize, block=False):
        self.poolmanager = PoolManager(
            num_pools=connections,
            maxsize=maxsize,
            block=block,
            ssl_version=self.ssl_protocol
        ) 
开发者ID:BeanWei,项目名称:Dailyfresh-B2C,代码行数:9,代码来源:utils.py

示例9: init_poolmanager

# 需要导入模块: from requests.packages.urllib3 import poolmanager [as 别名]
# 或者: from requests.packages.urllib3.poolmanager import PoolManager [as 别名]
def init_poolmanager(self, connections, maxsize, block=False):
        self.poolmanager = PoolManager(num_pools=connections,
                                       maxsize=maxsize,
                                       block=block,
                                       assert_hostname=False,
                                       ssl_version=ssl.PROTOCOL_SSLv23) 
开发者ID:ibmresilient,项目名称:resilient-community-apps,代码行数:8,代码来源:qradar_rest_client.py

示例10: init_poolmanager

# 需要导入模块: from requests.packages.urllib3 import poolmanager [as 别名]
# 或者: from requests.packages.urllib3.poolmanager import PoolManager [as 别名]
def init_poolmanager(self, connections, maxsize, block=False):
        self.poolmanager = PoolManager(num_pools=connections,
                                       maxsize=maxsize,
                                       block=block,
                                       cert_reqs=ssl.CERT_REQUIRED,
                                       ca_certs=_TRUSTED_CERT_FILE,
                                       ssl_context=self.create_ssl_context()) 
开发者ID:smartsheet-platform,项目名称:smartsheet-python-sdk,代码行数:9,代码来源:session.py


注:本文中的requests.packages.urllib3.poolmanager.PoolManager方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。