No project description provided
Project description
这是一个简易的状态机,包含了三个部分:
- key:状态机的标识,可以跨文件通用
- status:状态机的各种状态
- action:封装好的状态机的动作,每个动作都可以使一种状态转移至另一种状态
使用说明
使用do可以执行一个动作
使用when函数可以作为装饰器,将目标函数约定好执行的限制,和执行的辅助动作
使用check_status_now来检查当前的状态是否是预期的状态
注意事项
- 任何动作的执行都必须是有效的。任何无效的动作,或者传入了错误的状态字符,都会产生报错
- 任何动作、状态,都会强制转换为str。不会保留原始数据类型
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
movoid_fsm-1.0.0.tar.gz
(3.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file movoid_fsm-1.0.0.tar.gz.
File metadata
- Download URL: movoid_fsm-1.0.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01c9ee38adf469140c4b40371979b30cd330c183da02a4a591b79103848b98bb
|
|
| MD5 |
03d280be7c5e36d0785dda836a06d96c
|
|
| BLAKE2b-256 |
aafb47787aee667406ab233059abb974a1cac7ecd91df464ef16a0351415f322
|
File details
Details for the file movoid_fsm-1.0.0-py3-none-any.whl.
File metadata
- Download URL: movoid_fsm-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
055434987dc5e99d96bfa2a413989301096dda8b68f8f6d2045f8834135dae35
|
|
| MD5 |
87a354b9f9400b7310164c413048c757
|
|
| BLAKE2b-256 |
368a0caac798a1c464f20e75c0670cc3238a91929572e3ace75b41727fca2eba
|