Documentation is here. This code is a Python implementation of deciders based on the F# code from Jérémie Chassaing located here dddeu-2023-deciders. There was additionally a talk on this, to be found here.
You can use pip install pycider or poetry add pycider to install this project from PyPI.
You can create Process or a Decider. A simple example of this can be found under the test composition page.
Decider is a simple state machine that seperates state changes and actions. Commands are actions which when executed return Events representing the results from the actions. You can use Event's to deterministically update the State allowing replayability and easy serialization by only saving Event's.
Commands are turned intoEvent's throughdecide()calls.Event's deterministically update theStatethroughevolve()calls.
Process is a simple state machine for managing a system. A system has several needs. The system given a State should be able to resume to the next Command, The system should be able to react to Event changes and return Command's for dealing with those changes. Finally the system should be able to update the State deterministically given a Event.
Event's are turned intoCommands thrughreact()calls.- Given a
State, the system should be able toresume()to the appropriateCommand. Event's deterministically update theStatethroughevolve()calls.