Skip to content

Instantly share code, notes, and snippets.

View smahs's full-sized avatar

Shams Madhani smahs

  • Eindhoven, Netherlands
View GitHub Profile
@smahs
smahs / gist:7133657
Last active December 26, 2015 09:59 — forked from pjenvey/gist:3808830
# This fork removes the request parameter for use with Flask framework
class JsonSerializableMixin(object):
def __json__(self):
"""
Converts all the properties of the object into a dict for use in json.
You can define the following in your class
_json_eager_load :