How to convert sqlalchemy to json format

My sample code is  below...

I'm struggling using various packages..etc. to convert..  the result that 
was received under variable rows.


from flask import Flask, jsonify, json
from flask_restful import reqparse, abort, Api, Resource
from sqlalchemy.ext.declarative import DeclarativeMeta
from sqlalchemy import create_engine
from sqlalchemy import MetaData, Column, Table, ForeignKey
from sqlalchemy import Integer, String
from sqlalchemy import select
from IPython.utils.tests.test_capture import hello_stderr
 
engine = 
create_engine('oracle://system:dec12ber@11.6.42.18:1521/dsv01p01',echo=True)
metadata = MetaData(bind=engine)
conn = engine.connect()
users_table = Table('HELP', metadata,autoload=True)

s = select([users_table])
res = conn.execute(s)

                      
rows = res.fetchall()
print rows

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to