python-state-manager
A simple state machine to handle states of programs.
Usage
Example:
from python_state_manager import StateManager
stateids = ["state1", "state2", "state3"]
statevalues = [1, 2, 3]
metadatas = [{"a": 1}, {"b": 2}, {"c": 3}]
sm = StateManager(stateids, statevalues, metadatas, currentstateid="state1")
print(sm.get_current_state().stateid)
# output: state1
sm.complete_state()
print(sm.is_finished())
# output: False
print(sm.get_current_state().stateid)
# state2
Enjoy!
Release files for python-state-manager 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python-state-manager-0.5.0.tar.gz | 15.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_state_manager-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.8 kB
Release files / python-state-manager-0.5.0.tar.gz
| Download URL | python-state-manager-0.5.0.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bdce09e1ecb185abe8c118436b1ca9ab47c2ab93016d56a6f76c44fa7d4bf2b8
|
|
BLAKE2b-256 checksum How to use checksums |
6732fffc46f135a1993fe8fecdb7cb36bd86fdf98dea14317c3fe3c159eb6923
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.5
|
Release files / python_state_manager-0.5.0-py3-none-any.whl
| Download URL | python_state_manager-0.5.0-py3-none-any.whl |
|---|---|
| Size | 15.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13ae2f9c97eded907358fd5794a45f5493ee02eba752698fd2c2cdad95b89ef7
|
|
BLAKE2b-256 checksum How to use checksums |
1f19e6dd2d989d9468e442c068d8d50ae4e43513cf24e6c1a8027317331acbaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.5
|