Skip to content

Instantly share code, notes, and snippets.

@bencleary
Last active August 23, 2019 09:32
Show Gist options
  • Save bencleary/e84709e3acf978725f192df6b5b9c5bb to your computer and use it in GitHub Desktop.
Save bencleary/e84709e3acf978725f192df6b5b9c5bb to your computer and use it in GitHub Desktop.
from enum import IntEnum
class CustomerTypes(IntEnum):
PROSPECT = 1
LEAD = 2
CUSTOMER = 3
@classmethod
def choices(cls):
return [(key.value, key.name) for key in cls]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment