top | item 44760903 (no title) e1gen-v | 7 months ago I do this in fast api and then pass get_whatever as a dependency to an endpoint discuss order hn newest whilenot-dev|7 months ago Alternatively you could make use of the lifespan[0] and its state[1][2].[0]: https://fastapi.tiangolo.com/advanced/events/#lifespan-funct...[1]: https://asgi.readthedocs.io/en/latest/specs/lifespan.html#li...[2]: https://www.starlette.io/lifespan/#lifespan-state
whilenot-dev|7 months ago Alternatively you could make use of the lifespan[0] and its state[1][2].[0]: https://fastapi.tiangolo.com/advanced/events/#lifespan-funct...[1]: https://asgi.readthedocs.io/en/latest/specs/lifespan.html#li...[2]: https://www.starlette.io/lifespan/#lifespan-state
whilenot-dev|7 months ago
[0]: https://fastapi.tiangolo.com/advanced/events/#lifespan-funct...
[1]: https://asgi.readthedocs.io/en/latest/specs/lifespan.html#li...
[2]: https://www.starlette.io/lifespan/#lifespan-state