Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

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.

Files for enumit, version 1.2
Filename, size File type Python version Upload date Hashes
Filename, size enumit-1.2.tar.gz (2.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page