通用灵活的python状态机库

pysm的Python项目详细描述


PYSM—Python状态机BR/> ------------BR/> BR/>通用灵活的Python状态机库。
BR/> BR/>图片:https://travis-ci.org/pgularski/pysm.svg?branch=master
:目标:https://travis ci.org/pgularski/pysm

…图片::https://coveralls.io/repos/github/pgularski/pysm/badge.svg?branch=master
:目标:https://coveralls.io/github/pgularski/pysm?分支=主

…图片::https://api.codacy.com/project/badge/grade/6f18f01639c242a0b83280a52245539d
:目标:https://www.codacy.com/app/pgularski/pysm?utm_source=github.com&;utm_medium=referration&;utm_content=pgularski/pysm&;utm_campaign=Badge_Grade

图片::https://landscape.io/github/pgularski/pysm/master/landscape.svg?style=flat
:目标:https://landscape.io/github/pgularski/pysm/master
:alt:code health

…图片::https://readthedocs.org/projects/pysm/badge/?version=latest
:目标:http://pysm.readthedocs.io/en/latest/?badge=latest
:alt:Documentation Status




实现简单和复杂的状态机
---------------------------

图片::https://cloud.githubusercontent.com/assets/3026621/15031178/bf5efb2a-124e-11e6-9748-0b5a5be60a30.png

图片::https://cloud.githubusercontent.com/assets/3026621/15031148/ad955f06-124e-11e6-865e-c7e3340f14cb.png



---------

`状态模式<;https://en.wikipedia.org/wiki/State椆Pattern>;`\br/>解决了许多问题,解开了代码并保存了理智。
它有点僵硬,不能伸缩。这个库的目标是给
接近状态模式的简单性和更大的灵活性。以及,
如果需要,完整的状态机功能,包括“FSM
<;https://en.wikipedia.org/wiki/Finite-state\u machine>;”、“HSM
<;https://en.wikipedia.org/wiki/UML\u state\u machine
;“BR/> BR/> BR/>目标-BR/> -BR/>< BR/> *提供一种状态模式,如行为更灵活(参见
文件http://PysM.Read DecsIO/En/最新/示例).html(gt;< < BR/>示例)
********************************************************************************输入(不仅仅是字符串)-解析
字符串又酷了!
*保持简单,即使对于不太熟悉fsm术语的人也一样





-输入、退出和其他事件处理程序
*条目和退出操作与状态关联,不转换
*只要事件是可散列的,事件就可以是任何事件
*状态历史和转换到以前的状态
*条件转换(if/elif/else-like-logic)
*显式行为(不向包含状态机的对象添加方法或属性)
*无需扩展具有状态机类的类(组合优先于继承)
*快速(即使有数百个转换规则)
*不会有太多pythonis,因此它很容易移植到其他语言(例如,`JavaScript<;https://github.com/pgularski/smjs>;````.
*Micropython支持


Installation
----

Install pysm from`PyPI<;https://pypi.python.org/pypi/pysm/>;`:


>或克隆“github pysm存储库”<;https://github.com/pgularski/pysm/>;`:

git克隆https://github.com/pgularski/pysm
cd pysm
python setup.py install


文档
----


阅读文档获取API文档和示例-http://pysm.Read the docs.io/

请参阅单元测试以了解它的工作和广泛测试。


Micropython支持
----
库与pyboards一起工作!





>upip.install('upysm'upism')




-
*`documentation<;http://pysm.readthedocs.io>;` `<
*`installation<;http://pysm.readthedocs.io/en/最新/installing.html>;` ` ` ` ` ` ` `<
*`github<;http://pythub.com/pgularski/pysmki/pysm>;` ` ` ` ` ` ` ` ` ` ` ` ` ` ` https://github.com/pgularski/pysm/issues>;`
*`examples<;http://pysm.readthedocs.io/en/latest/examples.html>;`



欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何使用JNA创建同一库的多个实例?   java在将Graphql查询作为JSON字符串传递时收到意外的令牌错误   OAuth2 oltu的java问题   java桌面应用程序使用的好的嵌入式数据库是什么?   java Firebase数据库高级查询选项   java正在使磁盘上的EhCache元素过期   java 安卓还原处于backstack中的片段的实例状态   XMemcached中的java异步集   java TimescaleDB是否使用与Postgresql完全相同的JDBC驱动程序?   java从网站c读取信息#   检查java Android中的字符串是否只包含数字和空格   c#如何向web服务发送特殊字符?   grails无法调用需要java的方法。lang.类参数?   java我在组合框中调用的方法不会运行所有代码,它只运行部分代码   java发送带有标头的HTTP GET请求