Replies: 2 comments 1 reply
-
actually, I think something even better than just support "async function", would be to have this package work as a dependency instead of a decorator, since it would allow us to get all advantages of fastapi's dependency injection system. At my company, with one of our applications, we have a dynamic key_func based on something retrieved from one of our dependencies, and we encountered your issue. We found a very ugly workaround that works, but it would be waaay better to have it work as a dependancy directly, without having to do our weird workaround. Let me know if I understood your use-case correctly, and if seeing parts of our workaround code could help you. |
Beta Was this translation helpful? Give feedback.
-
Yes, making this package work as a dependency would be great. |
Beta Was this translation helpful? Give feedback.
-
I think it could be usefull to be able to call async function for key_func and cost.
It would allow us to get the Request data, and use that as the cost.
My usecase is the following:
Beta Was this translation helpful? Give feedback.
All reactions