from fsm_base import FSMBase class Buttons(FSMBase): states = ['A', 'B', 'C'] transitions = [ {'trigger': 'anchor_a', 'source': 'A', 'dest': 'B'}, {'trigger': 'anchor_b', 'source': 'B', 'dest': 'C'}, {'trigger': 'anchor_c', 'source': 'C', 'dest': 'A'}, ] def __init__(self): super().__init__('A') fsm = Buttons()