def __init__(self, length, **kwargs):
    if kwargs.get('collate'):
        if kwargs['collate'].upper() not in ['BINARY', 'NOCASE', 'RTRIM']:
            raise TypeError('%s is not a valid SQLite collation' % kwargs[
                'collate'])
Case insensitive string columns in SQLAlchemy?