Installation

Latest release

To install using uv:

uv add python-statemachine

To install using poetry:

poetry add python-statemachine

Alternatively, if you prefer using pip:

python3 -m pip install python-statemachine

For those looking to generate diagrams from your state machines, pydot and Graphviz are required. Conveniently, you can install python-statemachine along with the pydot dependency using the extras option. For more information, please refer to our documentation.

python3 -m pip install "python-statemachine[diagrams]"

From sources

The sources for Python State Machine can be downloaded from the Github repo.

You can either clone the public repository:

git clone git://github.com/fgmacedo/python-statemachine

Or download the tarball:

curl  -OL https://github.com/fgmacedo/python-statemachine/tarball/main

Once you have a copy of the source, you can install it with:

python3 -m pip install -e .