Skip to content

Tag: flask-sqlalchemy

Show the SQL generated by Flask-SQLAlchemy

I want to get the SQL issued by Flask-SQLAlchemy queries. In Django, I can print the query attribute to get SQL. How can I get something similar in Flask? Answer Flask-SQLAlchemy records debugging information about all queries during a request. You can get the information with get_debug_queries(). Flask-Debug…