Skip to content

Instantly share code, notes, and snippets.

@avelino
Created February 16, 2017 01:13
Show Gist options
  • Save avelino/a6334c7f3be4d7ef7ecdc0b831ac1824 to your computer and use it in GitHub Desktop.
Save avelino/a6334c7f3be4d7ef7ecdc0b831ac1824 to your computer and use it in GitHub Desktop.
class Entity(Base):
__tablename__ = 'entity'
id = Column(Integer, Sequence('id_seq'), primary_key=True)
name = Column(String(50))
def __init__(self, name):
self.name = name
def __repr__(self):
return "<Entity('%d', '%s')>" % (self.id, self.name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment