class Obs(DeclarativeBase):
    __tablename__ = 'obs'
id = Column(Integer, primary_key=True)
state = Column(Integer, default=0)

@validates('state')
def update_state(self, key, value):
    pass
Trigger in sqlachemy