Store list of enum member.
Project description
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
Getting started
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])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for SQLAlchemy-Enum-List-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04c268ab63147105dc4f0eec2f96efbe8a5142193059b61c9154da7c8dd5274d |
|
MD5 | ced6cc1a86f2f305ea39fed4c7cc0339 |
|
BLAKE2b-256 | 28496341795a3c03a605ba66206e52ced8e3abaa185e9ba00de8edf7abe8d7ec |
Close
Hashes for SQLAlchemy_Enum_List-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bbed11aef17d4384638ff50e1d83b75a6d42557c1deaa8dd09fecf8e2a91997 |
|
MD5 | b9d0b2995c97821059e29bbf2c69467a |
|
BLAKE2b-256 | 900434a31c64dc61ad7a728d573ea9235fc73fa9811110724a3023d157b4413f |