OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Data & Analytics

Pm4Py

PM4Py is an open-source Python library that provides process-mining algorithms to analyze and explore business-process data.

Independent OpenViST project profile, based on linked sources.

Pm4Py — OpenViST project profile in AI Data & Analytics.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use PM4Py when you want to work with process-mining algorithms in a Python project, including the documented workflow of deriving and displaying a Petri net from an XES log.

Who it is for

  • Researchers studying process-mining methods with Python.
  • Industry teams analyzing business-process event data.
  • Python developers prototyping process-analysis or process-improvement studies.

Documented uses

  • Read an XES event log and discover a Petri net with the inductive method.
  • Explore business-process behavior through process-mining algorithms.
  • Prototype process-improvement studies using Python.
Before you choose

Requirements & limits

The public open-source version is licensed under AGPL-3.0. A separate license is offered for commercial use in closed-source environments.

  • The standard installation is listed for Python 3.9 through 3.14.
  • Optional integrations are organized as extras, including ml, polars, visualization and solvers.
  • The documented introductory example uses XES input and produces a displayed Petri net.
  • Commercial use in a closed-source environment requires reviewing the separate licensing option.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install PM4Py and try the documented XES example

Set up the Python library and use its README example to discover and display a Petri net from an XES event log.

Before you start

  • Python 3.9 through 3.14 for the listed standard installation.
  • An XES event-log file available at a local path.

Steps

  1. Install the package with the command below.

    Documented command
    pip install -U pm4py
  2. In a Python script, import pm4py and read the event log with pm4py.read_xes('').

  3. Pass the log to pm4py.discover_petri_net_inductive(log) to obtain the net and its initial and final markings.

  4. Display the result with pm4py.view_petri_net(net, initial_marking, final_marking, format="svg").

Expected outcome

The example discovers a Petri net from the log and displays it in SVG format.

Guide limitations

  • The example requires an XES log file; other input formats are not covered by this recipe.
  • Optional feature groups are installed separately when needed.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
13 October 2026
Original website title
process-intelligence-solutions/pm4py · Official homepage title · retained in its source language