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 = 
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

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See 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 post to this group, send email to
Visit this group at
For more options, visit

Reply via email to