PM4Py provides Python algorithms and tools to discover, analyze, check conformance, and optimize business processes from event logs. You compose analyses in code rather than a fixed GUI.
Overview
PM4Py packages process mining capabilities as importable Python functions for researchers, data scientists, and software teams. Event logs in common formats can be loaded and transformed before running discovery, conformance, performance, organizational, filtering, and machine-learning-oriented analyses.
Discovery routines produce models such as directly-follows graphs, Petri nets, BPMN diagrams, and process trees. Conformance checking compares traces to models with alignment and replay-based diagnostics. Performance views highlight waiting times, spectra, and case durations.
Object-centric and predictive mining extensions appear alongside optional dependency groups for calendars, connectors, LLM helpers, ML solvers, Polars data frames, and visualizations. Default installs cover mainstream workflows; extras add integrations when needed.
The open GitHub release uses the AGPL for free use, while a separate license is offered for closed-source commercial products. Documentation, tutorials, and API references are maintained on the project website, and the library runs across major desktop platforms when installed via pip.
Key features
- Process discovery from event logs
- Conformance and alignment checking
- Performance and duration analysis
- BPMN, Petri net, and tree models
- Event log filtering and statistics
- Optional Polars and ML extras
- Object-centric process mining support
- Visualization helpers for models
Use cases
- Analyzing business process event logs
- Checking model fit to real traces
- Embedding mining in Python products
- Research prototypes with PM4Py
- Automated recurring process reports