Skip to content

Releases: gemerden/statemachine

A new version, this time as release, with easier configuration and better performance.

16 Feb 14:37
Compare
Choose a tag to compare

This state machine implementation is developed with the following goals in mind:

  • Easy to use API, for configuration of the state machine and triggering state transitions,
  • Usable for any (almost, I'm sure) python class with a finite number of states,
  • Fully featured, including nested states, conditional transitions, shorthand notations, many ways to configure callbacks,
  • Simple state machines do not require advanced knowledge; complexity of configuration scales with complexity of requirements,
  • One state machine manages the state of all instances of a class; the objects only store their current state as a string,
  • Option to use multiple interacting state machines in the same class, with no added complexity,
  • Optimized for speed and memory efficient.

In this release:

  • simplified configuration and partial auto-generation of state-machine (minimally just using state names),
  • adding callbacks to the state machine using decorators, instead of directly in the main configuration,
  • much improved speed: a single transition with a single (minimal) callback now takes < 2 microseconds on a my 5 year old PC,
  • basic option to create a graph from the state machine, using graphviz,
  • better validation with improved error messages.