React Flow graph engine for pytransitions state machines
Project description
transitions-reactflow
React Flow graph engine for pytransitions state machines.
Installation
pip install transitions-reactflow
Quick Start
from transitions_reactflow import ReactFlowMachine
states = ['idle', 'running', 'stopped']
transitions = [
{'trigger': 'start', 'source': 'idle', 'dest': 'running'},
{'trigger': 'stop', 'source': 'running', 'dest': 'stopped'}
]
machine = ReactFlowMachine(
states=states,
transitions=transitions,
initial='idle'
)
graph_data = machine.get_graph()
# Returns: {'nodes': [...], 'edges': [...]}
Demo
See the demo app for complete examples including Flask backend for serving graph descriptions and React frontend for displaying the graphs.
Run the demo:
cd demo
npm i
npm run build
python server.py
Then visit http://localhost:5050 to see examples for all machine extensions.
Credits
Built on pytransitions.
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
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 transitions_reactflow-0.1.1.tar.gz.
File metadata
- Download URL: transitions_reactflow-0.1.1.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e2493c0b2d9a80e3ac469ccfbce980593665d472ef513fc906877efe0744caa
|
|
| MD5 |
c9c7045fc1ea5e4d2d7221533dc9e372
|
|
| BLAKE2b-256 |
e6844d6157ddca799728eab24d5080b12f425974f3bfaed64246b64c3c1f3841
|
Provenance
The following attestation bundles were made for transitions_reactflow-0.1.1.tar.gz:
Publisher:
publish-pypi.yml on JohnsonLM/transitions-reactflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
transitions_reactflow-0.1.1.tar.gz -
Subject digest:
1e2493c0b2d9a80e3ac469ccfbce980593665d472ef513fc906877efe0744caa - Sigstore transparency entry: 928485791
- Sigstore integration time:
-
Permalink:
JohnsonLM/transitions-reactflow@e62042af0dd47b57faf576143c48d8085496b324 -
Branch / Tag:
refs/tags/v0.1.1-alpha - Owner: https://github.com/JohnsonLM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@e62042af0dd47b57faf576143c48d8085496b324 -
Trigger Event:
release
-
Statement type:
File details
Details for the file transitions_reactflow-0.1.1-py3-none-any.whl.
File metadata
- Download URL: transitions_reactflow-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3196d23fc3302db8a48c8bcad74e67ca02d4adf3a76990bb5d29cb044032cfd0
|
|
| MD5 |
3e0975e9a6b59b69687d78bc6af17f68
|
|
| BLAKE2b-256 |
e1e8e984a072e4a0937d775168c2248070afde90e0e15e5849334c084f44e40e
|
Provenance
The following attestation bundles were made for transitions_reactflow-0.1.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on JohnsonLM/transitions-reactflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
transitions_reactflow-0.1.1-py3-none-any.whl -
Subject digest:
3196d23fc3302db8a48c8bcad74e67ca02d4adf3a76990bb5d29cb044032cfd0 - Sigstore transparency entry: 928485792
- Sigstore integration time:
-
Permalink:
JohnsonLM/transitions-reactflow@e62042af0dd47b57faf576143c48d8085496b324 -
Branch / Tag:
refs/tags/v0.1.1-alpha - Owner: https://github.com/JohnsonLM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@e62042af0dd47b57faf576143c48d8085496b324 -
Trigger Event:
release
-
Statement type: