A lightweight markup language for simple workflow diagrams.
Project description
workfl
Workflow Markup Language
Introduction
workfl is a lightweight markup language for simple workflow diagrams. It's designed to be quick to write and easy to read.
Example:
A
B
D
A
C
D
You can try it out for yourself at workfl.ws.
The workfl python package can convert workfl markup into dictionaries of nodes and connections. There is also a method to export the workflow into mermaid syntax.
Installation
pip install workfl
Usage
import workfl
markup = "A\nB"
flow = workfl.ws(markup)
print(flow.nodes) # A dictionary of nodes
print(flow.connections) # A dictionary of connections
mermaid = flow.to_mermaid()
print(mermaid)
By default to_mermaid()
will render a chart flowing from Top to Bottom. This can be changed by declaring a direction
e.g. to_mermaid(direction="LR")
(Left to Right). There are 4 options:
Option | Direction |
---|---|
TB | Top to Bottom (Default) |
BT | Bottom to Top |
LR | Left to Right |
RL | Right to Left |
Syntax
A full guide can be found here https://workfl.ws/?help=true.
To Do
- Test scripts.
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
Built Distribution
File details
Details for the file workfl-19.6.15.0.tar.gz
.
File metadata
- Download URL: workfl-19.6.15.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 520e617e93d2f4a90c2adf12d4857e32bbdd1f26677827efd26690a29c49ab11 |
|
MD5 | 8729f96afabfce7cc07032d9367000bd |
|
BLAKE2b-256 | 93c7afbbe690c8ac7578c236173925a59476462b8c63f51b0c001ccd5fd82cd5 |
File details
Details for the file workfl-19.6.15.0-py3-none-any.whl
.
File metadata
- Download URL: workfl-19.6.15.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cfd8c71557289b5f89f401cf89627ff25158f65d0cf41836ff136110233cda6 |
|
MD5 | 7c74dc3ac4c88199456d22e927cf96cc |
|
BLAKE2b-256 | 59182483bdd4d90cb0dbbf005d91bb140f1e845979e7d72896433bcbaef36e9a |