Created
February 16, 2017 01:13
-
-
Save avelino/a6334c7f3be4d7ef7ecdc0b831ac1824 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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