SQLALchemy And Python - Getting The SQL Result
I am using cloudkitty which is rating module in OpenStacks. But here question is regarding the SQLAlchemy and Python. I am new to SQLAlchemy. I need to fetch some details from a ta
Solution 1:
r = q.all()
returns raw SQLAlchemy results (iterable of instances). Python and SQLAlchemy do not have information how to serialize this for HTTP presentation. It simply calls Python string representation __str__
function which gives the default Python debug output.
What you most likely want to have is JSON presentation, as a common web de facto standard and platform neutral format, of SQLAlchemy data. It is extensively covered in this question.
Post a Comment for "SQLALchemy And Python - Getting The SQL Result"