nodes = db.query(A.id, B.name,C.name,D.name).outerjoin(B,C,D).filter(A.id==node_id).all()
for item in nodes:
print(item)
output is
<class 'sqlalchemy.engine.row.Row'>
(3, 'this is name', None, None)
i want ouput dict like this {'id':3,'B.name':'this is name'...}
What should I do?
Which good brother can help me?
That's what I'm doing now
I believe there will be a good brother and a better way
for item in nodes:
print(dict(zip(['id','A.name','B.name','C.name'],item)))