Support ASGI lifespan state #2634
Unanswered
GuillaumeDesforges
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It would be awesome of httpx could support ASGI's lifespan state: https://asgi.readthedocs.io/en/latest/specs/lifespan.html
Lifespan state allows to share state between requests, such as a ML model in GPU or a connection to a database.
It is supported by other important ASGI servers such as uvicorn (ref: Kludex/uvicorn#1818)
However
httpxis the recommended library to test FastAPI apps (AsyncClient) so we can't test such applications.Beta Was this translation helpful? Give feedback.
All reactions