當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。