Instead of issuing one connexion to the SQL backend on each request, use the SQL alchemy native method to interact with the database.
This is usually done with a singleton object managing the database connexion, and all the other functions build the SQL statement and pass it to this object.
Instead of issuing one connexion to the SQL backend on each request, use the SQL alchemy native method to interact with the database.
This is usually done with a singleton object managing the database connexion, and all the other functions build the SQL statement and pass it to this object.