An Infinite State Machine
Project description
python_state_machine
An Infinite State Machine implemented in python
Why "Infinite"?
Finite state machines are a great method for implementing event driven applications and operating systems. However, when implemented, they become fixed implementations of an application that do not easily lend themselves to refactoring into another application.
The Infinite State Machine implemented here uses "Action Packs" that can be easily shared with other State Machines. By abstracting the actions required to implement specific functions, such as a message queue or an automation framework, developing a state machine becomes as simple and familiar as writing a Python application that imports its functionality in packages.
Unit Tests
Run the unit tests from the package root using this syntax:
python3 -m unittest -v ism.tests.test_ism.TestISM
To clean down the unit test mysql databases created log into mysql using the -s option to give clean result sets, then:
mysql> SELECT CONCAT('DROP DATABASE ', SCHEMA_NAME, ';') FROM
information_schema.schemata WHERE SCHEMA_NAME LIKE '%ism_default_%';
CONCAT('DROP DATABASE `', SCHEMA_NAME, '`;')
DROP DATABASE `ism_default_1611855489819`;
DROP DATABASE `ism_default_1611855533770`;
DROP DATABASE `ism_default_1611856233213`;
DROP DATABASE `ism_default_1611856253150`;
DROP DATABASE `ism_default_1611856264937`;
Then copy and paste the drop statements into the command line.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for infinite-state-machine-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a0b1aea70548e01c5e749cbbcaa37ebd3e005d6231e881ca908720fb0ed43d2 |
|
MD5 | cff7980f4245c18fb1c5315833d2e4ce |
|
BLAKE2b-256 | f8e8e178e5f506f594d222fb324bb0fe3e09e6edbf0e6da50e3a0902f6ec12a7 |
Hashes for infinite_state_machine-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2c0a869867073263a682112d5510f306aa256768048f65a24f3de4c2420c63a |
|
MD5 | 03801f56d06a4da178e20288d914212b |
|
BLAKE2b-256 | c375300074c2c9a829ce2dc799cb0715bff5fc2b820ff301b3eadd0d87f88c88 |