A state machine implemented in python. Uses states and transitions.