Created
July 21, 2015 15:57
-
-
Save bekatom/8c24accca3d48053d385 to your computer and use it in GitHub Desktop.
list_to_dict.py
This file contains hidden or 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
| #SQL alchemy object to list method | |
| def to_dict(data): | |
| """ | |
| :param data: | |
| :returns objects list in dictionary : | |
| """ | |
| return [u.__dict__ for u in data] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment