transitions (conda): A lightweight, object-oriented finite state machine implementation in Python with many extensions
Keywords: hierarchical-state-machine|nested-states|python|state-diagram|state-machine