From: Ahmed Maher Date: Sat, 28 Sep 2019 19:55:19 +0000 (+0300) Subject: Expose ASGIDispatch & WSGIDispatch in the 'dispatch' namespace. (#407) X-Git-Tag: 0.7.5~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ced56b5b55813bc38d571fdba6176842c0ec716;p=thirdparty%2Fhttpx.git Expose ASGIDispatch & WSGIDispatch in the 'dispatch' namespace. (#407) --- diff --git a/docs/advanced.md b/docs/advanced.md index 6acad3b6..99fbb651 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -53,7 +53,7 @@ For example: ```python # Instantiate a client that makes WSGI requests with a client IP of "1.2.3.4". -dispatch = httpx.WSGIDispatch(app=app, remote_addr="1.2.3.4") +dispatch = httpx.dispatch.WSGIDispatch(app=app, remote_addr="1.2.3.4") client = httpx.Client(dispatch=dispatch) ``` diff --git a/httpx/dispatch/__init__.py b/httpx/dispatch/__init__.py index 4057d6ea..3089371f 100644 --- a/httpx/dispatch/__init__.py +++ b/httpx/dispatch/__init__.py @@ -2,3 +2,7 @@ Dispatch classes handle the raw network connections and the implementation details of making the HTTP request and receiving the response. """ +from .asgi import ASGIDispatch +from .wsgi import WSGIDispatch + +__all__ = ["ASGIDispatch", "WSGIDispatch"]