Created
May 23, 2019 09:52
-
-
Save alik472/5c56f2b067cf9edbb0b6c9dd54ad4340 to your computer and use it in GitHub Desktop.
sqlalchemy to dic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def toDict(self): | |
return { c.key: getattr(self, c.key) for c in inspect(self).mapper.column_attrs } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment