Skip to main content

Enumeration library for python.

Project description

Enumeration library for python.

Basic Usage

from enumit import Enum


class Status(Enum):
    APPROVED = Enum.Field('approved')
    DENIED = Enum.Field('denied', 'Denied')

>> Status.APPROVED
>> approved

>> Status['approved']
>> Approved

>> Status.choices()
>> [('approved', 'Approved'), ('denied', 'Denied')]

>> Status.values()
>> ['approved', 'denied']

>> Status.names()
>> ['Approved', 'Denied']

>> 'approved' in Status
>> True

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

enumit-1.2.tar.gz (2.2 kB view hashes)

Uploaded source

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