def __init__(self, a):
    self.a = MarkdownText(a)

def __repr__(self):
    return '(%s)' % self.a
Base.metadata.create_all(engine)
session.add_all([Foo('test'), Foo('nips')])
session.commit()
x = session.query(Foo).all()
print(x)
print(x[0].a.__html__)
print(x[0].a)
How do I make compound columns with SQLAlchemy declarative?