codekingpro/portable-devtools
114k
1from .connection import AsyncHTTPConnection2from .connection_pool import AsyncConnectionPool3from .http11 import AsyncHTTP11Connection4from .http_proxy import AsyncHTTPProxy5from .interfaces import AsyncConnectionInterface6 7try:8 from .http2 import AsyncHTTP2Connection9except ImportError: # pragma: nocover10 11 class AsyncHTTP2Connection: # type: ignore12 def __init__(self, *args, **kwargs) -> None: # type: ignore13 raise RuntimeError(14 "Attempted to use http2 support, but the `h2` package is not "15 "installed. Use 'pip install httpcore[http2]'."16 )17 18 19try:20 from .socks_proxy import AsyncSOCKSProxy21except ImportError: # pragma: nocover22 23 class AsyncSOCKSProxy: # type: ignore24 def __init__(self, *args, **kwargs) -> None: # type: ignore25 raise RuntimeError(26 "Attempted to use SOCKS support, but the `socksio` package is not "27 "installed. Use 'pip install httpcore[socks]'."28 )29 30 31__all__ = [32 "AsyncHTTPConnection",33 "AsyncConnectionPool",34 "AsyncHTTPProxy",35 "AsyncHTTP11Connection",36 "AsyncHTTP2Connection",37 "AsyncConnectionInterface",38 "AsyncSOCKSProxy",39]40 