Skip to main content

A lightweight markup language for simple workflow diagrams.

Project description

PyPI

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

Example

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

workfl-19.6.15.0.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

workfl-19.6.15.0-py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 3

Supported by

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