azure-functions-python-library icon indicating copy to clipboard operation
azure-functions-python-library copied to clipboard

Run startup and shutdown before handle http request

Open carderne opened this issue 3 years ago • 1 comments

We're using this diff to work with a stac-fastapi app that needs to set up and tear down a DB connection for each request.

I'm not sure how generic this API is supposed to be, but this should definitely work with any Starlette implementation (relevant startup code here.

Fully understand if the scope for this library is broader, I haven't done much due diligence.

carderne avatar Sep 09 '22 15:09 carderne

Thanks for the PR, there's a lot of edge cases and scenarios to handle, I've submitted a PR, #187 with a full implementation

tonybaloney avatar Jul 25 '23 01:07 tonybaloney