A simple Python finite state machine (FSM) for state management in applications. Current version: 2.1.6. Release cadence is irregular, with maintenance updates as needed.
pip install fysomVerified import paths — ran on the pinned version, not inferred.
Create a simple state machine with two states and two events.
Use the new Fysom class with dictionary-based event definitions. Callbacks now receive the event object instead of state names as separate arguments.
In v2.x, set 'final' as a top-level key in the constructor dict: Fysom({'initial': 's1', 'final': 's5', 'events': [...]})Avoid naming events 'current', 'is_finished', or any reserved attribute.
Upgrade pip and setuptools: pip install --upgrade pip setuptools && pip install fysom
In v2.x, events must be defined as a list of dictionaries, each with keys 'name', 'src', 'dst'. Example: events=[{'name': 'wake', 'src': 'asleep', 'dst': 'awake'}]Check the event definition; the method name is exactly the 'name' field of the event dictionary. Ensure it is lowercase and matches.
No dependency data recorded yet.