Skip to content

v1.0.1 "crimson meerkat"

Compare
Choose a tag to compare
@blakewatters blakewatters released this 28 Nov 02:18
· 29 commits to main since this release

Hear me and rejoice!

This is the initial stable release of statesman, dubbed "crimson meerkat".

Statesman is a modern, asyncio focused library for implementing Finite State Machines in Python 3.6+. It has been designed to deliver an elegant, expressive API for modeling state machines and interacting with them from application code.

Version 1.0 includes the following:

  • A lightweight, yet fully-featured implementation of the usual suspects you expect to see in a Finite State Machine library (states, events, transitions, actions).
  • A declarative, simple API utilizing type hints, decorators, and enums.
  • Provides a rich set of actions and callbacks for states and events. States support entry and exit actions, events have guard, before, on, and after actions. State machine-wide callbacks are provided via overridable methods.
  • Designed and built async native. Callbacks are dispatched asynchronously,
    making it easy to integrate with long-running, event-driven processes.
  • Guard actions can cancel transition before any state changes are applied.
  • Data can be modeled directly on the state machine subclass compliments of
    Pydantic.
  • Events support the use of arbitrary associated parameter data that is made available to all actions. Parameters are matched against the signature of the receiving callable, enabling compartmentalization of concerns.
  • Solid test coverage and documentation.