diff --git a/repos/ddbd2be15e20eb81de1a/serializable.py b/repos/ddbd2be15e20eb81de1a/serializable.py new file mode 100644 index 0000000..86a09db --- /dev/null +++ b/repos/ddbd2be15e20eb81de1a/serializable.py @@ -0,0 +1,9 @@ +cls = self.__class__ +property_names=[] + +for p in dir(cls): + if isinstance(getattr(cls, p), property): + property_names.append(p) + logging.debug('property names: {}'.format(property_names)) +for p in property_names: + ser['@%s' % p] = getattr(cls, p).fget(self) \ No newline at end of file