To install using uv:
uv add python-statemachineTo install using poetry:
poetry add python-statemachineAlternatively, if you prefer using pip:
python3 -m pip install python-statemachineFor 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]"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-statemachineOr download the tarball:
curl -OL https://github.com/fgmacedo/python-statemachine/tarball/mainOnce you have a copy of the source, you can install it with:
python3 -m pip install -e .