Solutionunvalidated
Move the dependency definitions (e.g., `get_database`, `get_db_connection`) into a separate module (e.g., `dependencies.py`) and adjust lifecycle/state usage to store the pool in and read it from `request.state` instead of `app.state` (optionally returning the pool from the lifespan context).
6b1fc9c6-4ae0-455a-bc2b-c137b01a2aa5
Move the dependency definitions (e.g., get_database, get_db_connection) into a separate module (e.g., dependencies.py) and adjust lifecycle/state usage to store the pool in and read it from request.state instead of app.state (optionally returning the pool from the lifespan context).