Skip to main content

Processpiper. An open source python library to generate business process diagram using code.

Project description

release Wheel Downloads Platforms license CodeFactor code size python version stars CI Twitter Follow

ProcessPiper (Business Process Diagram as Code)

ProcessPiper is an open source python library to generate business process diagram using python code or PiperFlow syntax.

InstallationUsage GuideChangelogs


Method 1: Generate business process diagram using English like PiperFlow syntax

This is a sample code to generate a business process diagram using PiperFlow syntax.

from processpiper.text2diagram import render

input_syntax = """
title: Sample Test Process
colourtheme: BLUEMOUNTAIN
    lane: End User
        (start) as start
        [Enter Keyword] as enter_keyword
        (end) as end
pool: System Search
    lane: Database System
        [Login] as login
        [Search Records] as search_records
        <Result Found?> as result_found
        [Display Result] as display_result
        [Logout] as logout
    lane: Log System
        [Log Error] as log_error

start->login: User \\nAuthenticate
login->enter_keyword: Authenticated
enter_keyword->search_records: Search Criteria
search_records->result_found: Result
result_found->display_result: Yes
display_result->logout->end
result_found->log_error: No
log_error->display_result

footer: Generated by ProcessPiper
"""

render(input_syntax, "my_process_map.png")

Method 2: Generate business process diagram using Python code

This is a sample code to generate a business process diagram using Python code. The code is self-explanatory. The diagram is generated using the default colour theme.

from processpiper import ProcessMap, EventType, ActivityType, GatewayType

with ProcessMap(
    "Sample Test Process", colour_theme="BLUEMOUNTAIN") as my_process_map:
    with my_process_map.add_lane("End User") as lane1:
        start = lane1.add_element("Start", EventType.START)
        enter_keyword = lane1.add_element("Enter Keyword", ActivityType.TASK)

    with my_process_map.add_pool("System Search") as pool1:
        with pool1.add_lane("Database System") as lane2:
            login = lane2.add_element("Login", ActivityType.TASK)
            search_records = lane2.add_element("Search Records", ActivityType.TASK)
            result_found = lane2.add_element("Result Found?", GatewayType.EXCLUSIVE)
            display_result = lane2.add_element("Display Result", ActivityType.TASK)
            logout = lane2.add_element("Logout", ActivityType.TASK)
            end = lane2.add_element("End", EventType.END)

        with pool1.add_lane("Log System") as lane3:
            log_error = lane3.add_element("Log Error", ActivityType.TASK)

    start.connect(login, "User \nAuthenticates").connect(
        enter_keyword, "Authenticated"
    ).connect(search_records, "Search Criteria")
    search_records.connect(result_found, "Result").connect(display_result, "Yes")
    display_result.connect(logout).connect(end)
    result_found.connect(log_error, "No").connect(display_result)

    my_process_map.set_footer("Generated by ProcessPiper")
    my_process_map.draw()
    my_process_map.save("my_process_map.png")

The generated diagram is as follows: Process Map

Features

  • Generate business process diagrams with Python code
  • Alternatively business process diagram can be generated by using PiperFlow
  • Business process diagrams contains
    • Diagram title
    • Pool(s)
    • Lane(s)
    • Elements:
      • Event: Start, End, Timer, Intermediate, Message, Signal, Conditional and Link
      • Activity: Task, Subprocess
      • Gateway: Inclusive, Exclusive, Parallel, Event
  • Support for different colour themes (See gallery) :
    • Default
    • GREYWOOF
    • BLUEMOUNTAIN
    • ORANGEPEEL
    • GREENTURTLE
    • SUNFLOWER
    • PURPLERAIN
    • RUBYRED
    • TEALWATERS
    • SEAFOAMS
  • Diagrams can be saved to PNG or SVG image formats
  • :new::fire: Diagrams can be exported to .bpmn XML file format

Frontend Application

Two frontend applications have been developed to showcase ProcessPiper capability.

Support and Community

ProcessPiper is still in the early days of development, if you have any problem, I will try my best to resolve it.

  • 📄 Find a solution in our Wiki
  • ⚠️ Open an issue right here on GitHub

Any ideas or suggestions, please send it to me via GitHub Discussions.

How to Contribute

If you'd like to contribute, start by reading our Contribution Guide.

Lets build great software together.

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

processpiper-0.8.1.tar.gz (59.3 kB view details)

Uploaded Source

Built Distribution

processpiper-0.8.1-py3-none-any.whl (74.2 kB view details)

Uploaded Python 3

File details

Details for the file processpiper-0.8.1.tar.gz.

File metadata

  • Download URL: processpiper-0.8.1.tar.gz
  • Upload date:
  • Size: 59.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for processpiper-0.8.1.tar.gz
Algorithm Hash digest
SHA256 c03097732bf2851e81adc6d2481b7080faff0f980cae5a841c1ce85ffa95de75
MD5 ac7929e304b1210b527cfb36ee693783
BLAKE2b-256 f6c4f1af36c477472f761d88e7ea3e34d400089543a9613c9354dc62415d101a

See more details on using hashes here.

File details

Details for the file processpiper-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: processpiper-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 74.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for processpiper-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1d54ef6464b4509b9dcecfd0072a8dcbb2c23d4e29c3faa0842c20cc3b14051d
MD5 20ea93128ab7aeb8fa2247f57229ae6e
BLAKE2b-256 36bc6c12790fcfe243af96e326a257a7808f791ea00551c09642a11babad8abe

See more details on using hashes here.

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