ok, and what about {1:{"id":"1","name":"Alex"},2:
{"id":"2","name":"Nick"}} format?

I try to
i=0
result = list()
for row in session.query(...).all():
    d = row.__dict__.copy()
    del d['_sa_instance_state']
    result.append(i)
    result.append(d)
    i = i + 1

but it gives
{ 1, {"id":"1","name":"Alex"}, 2, {"id":"2","name":"Nick"}}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to