Mercurial > hg > Feedworm
view Preference.py @ 63:b8d209fdad14
helper class to create Feed objects from an OPML feed
author | dirk@xanthippe.ping.de |
---|---|
date | Wed, 28 Jul 2010 21:14:34 +0200 |
parents | be990ac6e478 |
children |
line wrap: on
line source
class Preference(object): @staticmethod def forKey(key, session): return session.query(Preference).filter(Preference.key == key).first() def __init__(self, key, value): self.key = key self.value = value def __repr__(self): return "<Preference %s = %s>" % (self.key, self.value)