def connection_from_url(url, **kw):
    scheme, host, port = get_host(url)
    port = port or port_by_scheme.get(scheme, 80)
    if scheme == 'https':
        return HTTPSConnectionPool(host, port=port, **kw)
    else:
        return HTTPConnectionPool(host, port=port, **kw)
Given a url, return an :class:`.ConnectionPool` instance of its host.
dataset/ETHPy150Open kennethreitz/requests/requests/packages/urllib3/connectionpool.py/connection_from_url