Using lifespan event on APIRoute()
instead in FastAPI()
#9664
-
Privileged issue
Issue ContentI have asked Mr @tiangolo on Twitter this question and he suggested me to ask in Github so it can benefit others and I am agree with him. I have tried to apply lifespan event on I found that I hope anyone can help to solve this issue. Thank you for creating an awesome API framework. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
He probably meant to create a discussion, not an issue.
The
For the moment, is not possible. |
Beta Was this translation helpful? Give feedback.
-
Hi 👋🏼 I was going to submit an issue, but I saw this discussion. Here is a quick gist showing What is FastAPI official position on this ?
|
Beta Was this translation helpful? Give feedback.
He probably meant to create a discussion, not an issue.
The
APIRouter
is the one that acceptslifespan
, notAPIRoute
.For the moment, is not possible.