Python Forum
Sqlalchemy Query into tuple - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Sqlalchemy Query into tuple (/thread-11473.html)



Sqlalchemy Query into tuple - KirkmanJ - Jul-10-2018

If i was to query a SQLALCHEMY database for a row, like so:
product_query= test_result.query.filter(test_result.test_details =='Overall').filter(test_result.product_serial_number == product_search_value).first()
Then take the query's output and turn it into a tuple. Can this be achieved ( assume so) and how can it be achieved?

Background:My desired outcome is to take this row, pull a certain 'cell' from the row and use the value of the cell to search other tables and also take the values and display on a html page.

If there is another / easier way then tupling i am all ears