]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
added docs for startup/shutdown of ASGI apps (#1554)
authorJaakko Lappalainen <jkk.lapp@gmail.com>
Mon, 5 Apr 2021 08:55:57 +0000 (09:55 +0100)
committerGitHub <noreply@github.com>
Mon, 5 Apr 2021 08:55:57 +0000 (10:55 +0200)
docs/async.md

index 8ddee956ae0987dfcc8a9668221600a452d3ae27..360be8feaa4728bea3cf49bca90b6f8f53144eeb 100644 (file)
@@ -237,3 +237,9 @@ async with httpx.AsyncClient(transport=transport, base_url="http://testserver")
 ```
 
 See [the ASGI documentation](https://asgi.readthedocs.io/en/latest/specs/www.html#connection-scope) for more details on the `client` and `root_path` keys.
+
+## Startup/shutdown of ASGI apps
+
+It is not in the scope of HTTPX to trigger lifespan events of your app.
+
+However it is suggested to use `LifespanManager` from [asgi-lifespan](https://github.com/florimondmanca/asgi-lifespan#usage) in pair with `AsyncClient`.