Preview:
import db
from sqlalchemy import Column, Integer, String, Boolean

class Tarea(db.Base):

    __tablename__ = "Tarea"

    id = Column(Integer, primary_key=True)
    contenido = Column(String(200), nullable=False)
    hecha = Column(Boolean)

    def __init__(self, contenido, hecha):

        self.contenido = contenido
        self.hecha = hecha


    def __str__(self):

        return "{}: {}".format(self.contenido, self.hecha)
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter