--- id: pm4py version: "2.7.23.4" license: AGPL 3.0 license_treatment: agpl maintenance: active --- # pm4py — Process mining for Python License: agpl · Maintenance: active · Downloads: 120.3K/mo ## What it is and what it does PM4Py is a Python library for process mining—the discipline of extracting process models and insights from event logs recorded by business systems. It provides algorithms to discover Petri nets and other process representations from raw event data, and tools to visualize and analyze those models. The library is built on scientific foundations and depends on numpy, pandas, networkx, scipy, and matplotlib for numerical computing, data handling, graph operations, and visualization. Typical usage involves reading an event log (commonly in XES format), applying a discovery algorithm like inductive mining to generate a process model, and then viewing or analyzing the result. The package is actively maintained by Process Intelligence Solutions and is used in both academic research and industry applications. It carries an AGPL-3.0 license, meaning modifications must be shared under the same terms; commercial closed-source use requires a separate license. Use it for: - Discover Petri net models from event logs to understand actual business process flows. - Analyze conformance between recorded process executions and expected process models. - Visualize process models in multiple formats (SVG, PNG) for stakeholder communication. - Extract process metrics and statistics from event logs for process improvement. - Research and academic work on process mining algorithms and techniques. - Audit and compliance checking by comparing recorded activities against approved workflows. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PM4Py implements process mining algorithms to discover, analyze, and visualize process models from event logs, supporting formats like XES and outputting Petri nets and other process representations. Yes, if you work with process mining or need to analyze event logs and discover process models. The package is actively maintained, has low install friction, and provides a mature implementation of standard algorithms. However, be aware of the AGPL-3.0 license requirement—if you plan closed-source use, you must obtain a commercial license. No known security vulnerabilities. ## Install pip install pm4py uv add pm4py poetry add pm4py ## Installing pm4py Before you install: Low install friction with a pure-wheel distribution and 12 runtime dependencies that are all well-established scientific packages. Actively maintained with a recent release (4 days old) and steady commit activity. License in practice: Licensed under AGPL-3.0, which requires that any modifications or derivative works be released under the same license and made available to users. Commercial use in closed-source environments requires a separate commercial license from Process Intelligence Solutions. Quickstart: pip install pm4py import pm4py log = pm4py.read_xes('path-to-xes-log-file.xes') net, initial_marking, final_marking = pm4py.discover_petri_net_inductive(log) pm4py.view_petri_net(net, initial_marking, final_marking, format="svg") Requires graphviz system library for visualization; XES log files must be provided as input. Verify before relying: - Whether all 12 runtime dependencies are truly required for basic usage or if some are optional despite being listed as 'normal requirements'. - Performance characteristics and scalability limits for large event logs. - Availability and terms of the commercial license for closed-source use. ## Package facts - License: AGPL 3.0 (agpl) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 120.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags process mining python, petri net discovery, event log analysis, process model visualization, workflow mining algorithms, business process analysis, process discovery, process-mining, workflow-analysis, petri-nets [View on SkillFed](https://skillfed.io/packages/pm4py) · [View on PyPI](https://pypi.org/project/pm4py/)