{ "info": { "author": "Jeffrey McLarty", "author_email": "jeffrey.mclarty@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "==============================\r\nReadable Runtime State Machine\r\n==============================\r\n\r\n.. image:: https://travis-ci.org/jnmclarty/rrsm.svg?branch=master\r\n :target: https://travis-ci.org/jnmclarty/rrsm\r\n \r\n.. image:: https://coveralls.io/repos/jnmclarty/rrsm/badge.svg \r\n :target: https://coveralls.io/r/jnmclarty/rrsm\r\n\r\nEnables a finite state machine to be created **at run-time** *AND* leverage simple attribute syntax creating **self documenting code**.\r\n\r\nNormally these concepts are mutually exclusive, and in any finished design can hard coded. This module is handy during prototyping.\r\n\r\nUsage\r\n=====\r\n\r\n.. code:: python\r\n\r\n >>> from rrsm import StateMachine\r\n \r\n >>> #Instantiation works with a list of the form ['state', ...] \r\n ... #or a dictionary of the form {'state' : value, ...}\r\n ... SM = StateMachine(['cool', 'off', 'on', 'warm']) \r\n\r\n >>> #checking state works against strings or integers:\r\n ... SM == 'cool'\r\n True\r\n \r\n >>> #Change the state\r\n ... SM('warm')\r\n \r\n >>> #using attributes to check state:\r\n ... SM == SM.cool\r\n False\r\n >>> SM == SM.warm\r\n True\r\n >>> SM.current_state\r\n 'warm'\r\n >>> SM.current_code\r\n 3\r\n \r\nFor hardcoded finite state machines, the Super State Machine project seems like a more promising solution.\r\n\r\nThis implementation has no dependencies, nor does it import any of the standard library. It should work on any python version, but it's tested with 2.6, 2.7, 3.3 and 2.4. Some exceptions probably apply to the exception handling. Pun intended.\r\n\r\nInstall\r\n=======\r\n\r\nThe easiest way to install is::\r\n\r\n pip install rrsm", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/jnmclarty/rrsm/tarball/0.2.0", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jnmclarty/rrsm", "keywords": "readable,runtime,run-time,finite,state,machine", "license": "UNKNOWN", "maintainer": "", "maintainer_email": "", "name": "rrsm", "package_url": "https://pypi.org/project/rrsm/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/rrsm/", "project_urls": { "Download": "https://github.com/jnmclarty/rrsm/tarball/0.2.0", "Homepage": "https://github.com/jnmclarty/rrsm" }, "release_url": "https://pypi.org/project/rrsm/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Readable run-time state machine", "version": "0.2.0" }, "last_serial": 1452010, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "fbb3345345ee0173f6f7c8575e592be1", "sha256": "51f634997413e4d73944b84c384bdb2b3680069bce0abfb9b4198954fe78ca25" }, "downloads": -1, "filename": "rrsm-0.1.0.zip", "has_sig": false, "md5_digest": "fbb3345345ee0173f6f7c8575e592be1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6603, "upload_time": "2015-03-07T03:39:31", "url": "https://files.pythonhosted.org/packages/4e/2e/4928185d04a027925a09f9f673ef7b21baf830db0cf213f336dc9da4e1ce/rrsm-0.1.0.zip" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "6176ae5a882e9f24d22e27783d2fb47e", "sha256": "805b59d543caeab6cc58f97143469a12790cca7d88fd3180ccd72c067703e330" }, "downloads": -1, "filename": "rrsm-0.2.0.zip", "has_sig": false, "md5_digest": "6176ae5a882e9f24d22e27783d2fb47e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6729, "upload_time": "2015-03-07T13:14:05", "url": "https://files.pythonhosted.org/packages/4b/28/7f441ece7fb54571594f6cc90c7b22e46c4114c959815471a2fdcc2c7891/rrsm-0.2.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6176ae5a882e9f24d22e27783d2fb47e", "sha256": "805b59d543caeab6cc58f97143469a12790cca7d88fd3180ccd72c067703e330" }, "downloads": -1, "filename": "rrsm-0.2.0.zip", "has_sig": false, "md5_digest": "6176ae5a882e9f24d22e27783d2fb47e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6729, "upload_time": "2015-03-07T13:14:05", "url": "https://files.pythonhosted.org/packages/4b/28/7f441ece7fb54571594f6cc90c7b22e46c4114c959815471a2fdcc2c7891/rrsm-0.2.0.zip" } ] }