The new standard in Python is PEP 435, so an Enum class will be available in future versions of Python:
>>> from enum import Enum
However to begin using it now you can install the original library that motivated the PEP:
$ pip install flufl.enum
Then you can use it as per its online guide:
>>> from flufl.enum import Enum
>>> class Colors(Enum):
... red = 1
... green = 2
... blue = 3
>>> for color in Colors: print color
Colors.red
Colors.green
Colors.blue