DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
sqlalchemy convert row to dict
row2dict = lambda r: {c.name: str(getattr(r, c.name)) for c in r.__table__.columns}
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#sqlalchemy
#convert
#row
#dict
ADD COMMENT
Topic
COMMENT
Name
8+8 =
Submit