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

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page