Package: processpiper
ProcessPiper (Business Process Diagram as Code)ProcessPiper is an open source python library to generate business process diagram using python code orPiperFlowsyntax.Installation•Usage Guide•ChangelogsMethod 1: Generate business process diagram using English like PiperFlow syntaxThis is a sample code to generate a business process diagram usingPiperFlowsyntax.fromprocesspiper.text2diagramimportrenderinput_syntax="""title: Sample Test Processcolourtheme: BLUEMOUNTAINlane: End User(start) as start[Enter Keyword] as enter_keyword(end) as endpool: System Searchlane: Database System[Login] as login[Search Records] as search_records<Result Found?> as result_found[Display Result] as display_result[Logout] as logoutlane: Log System[Log Error] as log_errorstart->login: User\\nAuthenticatelogin->enter_keyword: Authenticatedenter_keyword->search_records: Search Criteriasearch_records->result_found: Resultresult_found->display_result: Yesdisplay_result->logout->endresult_found->log_error: Nolog_error->display_resultfooter: Generated by ProcessPiper"""render(input_syntax,"my_process_map.png")Method 2: Generate business process diagram using Python codeThis 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.fromprocesspiperimportProcessMap,EventType,ActivityType,GatewayTypewithProcessMap("Sample Test Process",colour_theme="BLUEMOUNTAIN")asmy_process_map:withmy_process_map.add_lane("End User")aslane1:start=lane1.add_element("Start",EventType.START)enter_keyword=lane1.add_element("Enter Keyword",ActivityType.TASK)withmy_process_map.add_pool("System Search")aspool1:withpool1.add_lane("Database System")aslane2: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)withpool1.add_lane("Log System")aslane3: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:FeaturesGenerate business process diagrams with Python codeAlternatively business process diagram can be generated by using PiperFlowBusiness process diagrams containsDiagram titlePool(s)Lane(s)Elements:Event: Start, End, Timer, Intermediate, Message, Signal, Conditional and LinkActivity: Task, SubprocessGateway: Inclusive, Exclusive, Parallel, EventSupport for different colour themes (Seegallery) :DefaultGREYWOOFBLUEMOUNTAINORANGEPEELGREENTURTLESUNFLOWERPURPLERAINRUBYREDTEALWATERSSEAFOAMSDiagrams can be saved to PNG or SVG formatsFrontend ApplicationTwo frontend applications have been developed to showcase ProcessPiper capability.Piperoni- A desktop applicationPiperita- A Streamlit web applicationSupport and CommunityProcessPiper 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 ourWiki⚠️ Open an issue right here onGitHubAny ideas or suggestions, please send it to me viaGitHub Discussions.How to ContributeIf you'd like to contribute, start by reading ourContribution Guide.Lets build great software together.