Skip to main content

React Flow graph engine for pytransitions state machines

Project description

transitions-reactflow

Tests

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

transitions_reactflow-0.1.1.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

transitions_reactflow-0.1.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

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

Hashes for transitions_reactflow-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1e2493c0b2d9a80e3ac469ccfbce980593665d472ef513fc906877efe0744caa
MD5 c9c7045fc1ea5e4d2d7221533dc9e372
BLAKE2b-256 e6844d6157ddca799728eab24d5080b12f425974f3bfaed64246b64c3c1f3841

See more details on using hashes here.

Provenance

The following attestation bundles were made for transitions_reactflow-0.1.1.tar.gz:

Publisher: publish-pypi.yml on JohnsonLM/transitions-reactflow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file transitions_reactflow-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for transitions_reactflow-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3196d23fc3302db8a48c8bcad74e67ca02d4adf3a76990bb5d29cb044032cfd0
MD5 3e0975e9a6b59b69687d78bc6af17f68
BLAKE2b-256 e1e8e984a072e4a0937d775168c2248070afde90e0e15e5849334c084f44e40e

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page