I am developing an app with flask and SQL Alchemy.
I need to display the queries executed to generate a page alongside the time each query took for debugging
What’s the best way to do it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I haven’t used it myself, but it seems that Flask Debug-toolbar may help with this.
https://github.com/mgood/flask-debugtoolbar
It’s a port of the django-debug-toolbar, which can be used for profiling queries.
The documentation of Flask Debug-toolbar doesn’t mention it, but there is code for a SQLAlchemyDebugPanel.
So I think it may be well worth to take a look at the project, and see if it does what you need.