python sqlalchemy column default value code example
Example 1: sqlalchemy db.column default value
Column('version', Integer, default=1)
Example 2: sqlalchemy function for default value for column
# a function which counts upwards
i = 0
def mydefault():
global i
i += 1
return i
t = Table("mytable", meta,
Column('id', Integer, primary_key=True, default=mydefault),
)