<filename>webapp/models.py<gh_stars>1-10
from sqlalchemy import Column, String, Boolean, Integer
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()


class User(Base):
    __tablename__ = "users"

    id = Column(Integer, primary_key=True, index=True)
    email = Column(String, unique=True, index=True)
    hashed_password = Column(String)
    is_active = Column(Boolean, default=True)

    def __repr__(self):
        return "<User(id='%s', email='%s', \
                hashed_password='%s', \
                is_active='%s')>" % (
            self.id, self.email, self.hashed_password, self.is_active)

<filename>webapp/models.py<gh_stars>1-10
from sqlalchemy import Column, String, Boolean, Integer
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()


class User(Base):
    __tablename__ = "users"

    id = Column(Integer, primary_key=True, index=True)
    email = Column(String, unique=True, index=True)
    hashed_password = Column(String)
    is_active = Column(Boolean, default=True)

    def __repr__(self):
        return "<User(id='%s', email='%s', \
                hashed_password='%s', \
                is_active='%s')>" % (
            self.id, self.email, self.hashed_password, self.is_active)
