Skip to content

Instantly share code, notes, and snippets.

@octaflop
Last active November 8, 2018 03:05
Show Gist options
  • Select an option

  • Save octaflop/803932bf781bb78cfde6b15d1104f546 to your computer and use it in GitHub Desktop.

Select an option

Save octaflop/803932bf781bb78cfde6b15d1104f546 to your computer and use it in GitHub Desktop.

Revisions

  1. octaflop revised this gist Nov 8, 2018. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions slcpythonsqlalchemy.py
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # Via https://docs.sqlalchemy.org/en/latest/orm/tutorial.html

    class User(Base):
    __tablename__ = 'users'
    id = Column(Integer, primary_key=True)
  2. octaflop created this gist Nov 8, 2018.
    9 changes: 9 additions & 0 deletions slcpythonsqlalchemy.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    class User(Base):
    __tablename__ = 'users'
    id = Column(Integer, primary_key=True)
    name = Column(String)
    fullname = Column(String)
    password = Column(String)
    def __repr__(self):
    return "<User(name='%s', fullname='%s', password='%s')>" % (
    self.name, self.fullname, self.password)