Skip to main content

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])

Changelogs

0.1.1

  • Added sqlalchemy_enum_list.EnumSetType

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

SQLAlchemy-Enum-List-0.1.1.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

SQLAlchemy_Enum_List-0.1.1-py2.py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page