Store list of enum member as unicode string. it works list of python on python-side & stored unicode text in database. To store scalar values like integer, float read about ScalarListType in SQLAlchemy-Utils
import enum
from sqlalchemy.schma import Column
from sqlalchemy_enum_list import EnumListType
class Genre(enum.Enum):
pop = 1
soul = 2
jazz = 3
class Song(Base):
genre = Column(EnumListType(Genre, int))
song = Song(genre=[Genre.soul, Genre.jazz])
- Added
sqlalchemy_enum_list.EnumSetType