jtushman / state_machine

Python State Machine for humans
MIT License
400 stars 31 forks source link

Add state machine inheritance, and get_next_events #23

Closed kageurufu closed 5 years ago

kageurufu commented 9 years ago

State machine inheritance allows for a superclass to define the states, then you can define custom events per subclass. This is especially useful with SQLAlchemy's polymorphic models.

get_next_events allows for really simple handling of more complex state trees, without lots of if/else trees in frontend code to handle the different states