Python comes with an enum module for creating enums. You can make your own enum by inheriting importing and inheriting from Enum.
from enum import Enum class LifeCycle(Enum): configure = 1 glob = 2 pre_render = 3 render = 4 post_render = 5 save = 6
Enum values can be auto incremented by importing auto, and calling
as their value.
from enum import Enum, auto class LifeCycle(Enum): configure = auto() glob = auto() pre_render = auto() render = auto() post_render = auto() save = auto()
Enum's are accessed directy under the class itself, and have primarily
two methods underneath each thing you make,
Lifecycle.glob Lifecycle.glob.value Lifecycle.glob.name