sqlalchemy set default value for column code example
Example 1: sqlalchemy db.column default value
Column('version', Integer, default=1)
Example 2: sqlalchemy function for default value for column
def mydefault(context):
return context.get_current_parameters()['counter'] + 12
t = Table('mytable', meta,
Column('counter', Integer),
Column('counter_plus_twelve', Integer, default=mydefault, onupdate=mydefault)
)