Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

infinite-state-machine-0.1.1.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

infinite_state_machine-0.1.1-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

Details for the file infinite-state-machine-0.1.1.tar.gz.

File metadata

  • Download URL: infinite-state-machine-0.1.1.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.2

File hashes

Hashes for infinite-state-machine-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5a0b1aea70548e01c5e749cbbcaa37ebd3e005d6231e881ca908720fb0ed43d2
MD5 cff7980f4245c18fb1c5315833d2e4ce
BLAKE2b-256 f8e8e178e5f506f594d222fb324bb0fe3e09e6edbf0e6da50e3a0902f6ec12a7

See more details on using hashes here.

File details

Details for the file infinite_state_machine-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: infinite_state_machine-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 27.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.2

File hashes

Hashes for infinite_state_machine-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d2c0a869867073263a682112d5510f306aa256768048f65a24f3de4c2420c63a
MD5 03801f56d06a4da178e20288d914212b
BLAKE2b-256 c375300074c2c9a829ce2dc799cb0715bff5fc2b820ff301b3eadd0d87f88c88

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page