azure-functions-python-library
azure-functions-python-library copied to clipboard
Run startup and shutdown before handle http request
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.
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