Skip to main content

这是一个简易的状态机,包含了三个部分:

  1. key:状态机的标识,可以跨文件通用
  2. status:状态机的各种状态
  3. action:封装好的状态机的动作,每个动作都可以使一种状态转移至另一种状态

使用说明

使用do可以执行一个动作

使用when函数可以作为装饰器,将目标函数约定好执行的限制,和执行的辅助动作

使用check_status_now来检查当前的状态是否是预期的状态

注意事项

  1. 任何动作的执行都必须是有效的。任何无效的动作,或者传入了错误的状态字符,都会产生报错
  2. 任何动作、状态,都会强制转换为str。不会保留原始数据类型

Metadata

Release files for movoid-fsm 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for movoid-fsm 1.0.0
File Size Uploaded Provenance Actions
movoid_fsm-1.0.0.tar.gz 3.7 kB Without provenance Details for movoid_fsm-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for movoid-fsm 1.0.0
File Interpreter ABI Platform Actions
movoid_fsm-1.0.0-py3-none-any.whl Python 3 none any Details for movoid_fsm-1.0.0-py3-none-any.whl

Total release size: 7.8 kB

Release files / movoid_fsm-1.0.0.tar.gz

Download URL movoid_fsm-1.0.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
01c9ee38adf469140c4b40371979b30cd330c183da02a4a591b79103848b98bb
BLAKE2b-256 checksum
How to use checksums
aafb47787aee667406ab233059abb974a1cac7ecd91df464ef16a0351415f322
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Release files / movoid_fsm-1.0.0-py3-none-any.whl

Download URL movoid_fsm-1.0.0-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
055434987dc5e99d96bfa2a413989301096dda8b68f8f6d2045f8834135dae35
BLAKE2b-256 checksum
How to use checksums
368a0caac798a1c464f20e75c0670cc3238a91929572e3ace75b41727fca2eba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Security for movoid-fsm 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page