How to use the geventhttpclient.connectionpool.ConnectionPool.DEFAULT_NETWORK_TIMEOUT function in geventhttpclient

To help you get started, we’ve selected a few geventhttpclient examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gwik / geventhttpclient / src / geventhttpclient / client.py View on Github external
def __init__(self, host, port=None, headers=None,
                 block_size=BLOCK_SIZE,
                 connection_timeout=ConnectionPool.DEFAULT_CONNECTION_TIMEOUT,
                 network_timeout=ConnectionPool.DEFAULT_NETWORK_TIMEOUT,
                 disable_ipv6=False,
                 concurrency=1,
                 ssl=False, ssl_options=None, ssl_context_factory=None,
                 insecure=False,
                 proxy_host=None, proxy_port=None, version=HTTP_11,
                 headers_type=Headers):
        if headers is None:
            headers = {}
        self.host = host
        self.port = port
        connection_host = self.host
        connection_port = self.port
        if proxy_host is not None:
            assert proxy_port is not None, \
                'you have to provide proxy_port if you set proxy_host'
            self.use_proxy = True