PM4Py — Process Mining for Python The open-source process mining library for Python.

See how your processes really run, where they differ from the plan and where time is lost, all with just a few lines of Python code. Researchers, developers and software companies around the world build on PM4Py.

pip install pm4py

Building a commercial product? See licensing options

In a Nutshell What is PM4Py?

A toolbox for process mining

PM4Py is a collection of ready-made process mining functions for the Python programming language. Instead of clicking through a user interface, you pick the tools you need and use them directly in your own code, so you don't have to build the algorithms yourself.

Your analysis, your rules

With PM4Py, you're never limited to the buttons and menus of a user interface. Every step of your analysis is up to you: automate recurring analyses, combine PM4Py with any other Python tool, or build something completely new. If you can imagine it, you can build it.

Made for people who code

Software companies, data scientists and researchers build on PM4Py instead of starting from scratch, from quick one-time analyses to complete software products. Our own tool, PMTk, is built on it too. PM4Py is downloaded more than 100,000+ times every month1.

1 According to pypistats.org

Why PM4Py?

Quick to learn, close to the latest research, and ready for commercial use.

Easy to start

Runs on all major platforms. Step-by-step tutorials and complete API documentation get you to your first result quickly.

Installation instructions

Latest research, ready to use

PM4Py covers the full range of process mining, from discovering processes and checking whether they run as planned to predictive and object-centric process mining. Developed close to research, it brings you new methods early.

List of PM4Py features

Open source, ready for business

PM4Py is free and open source under the AGPL v3 license. If you build a commercial product and want to keep your source code private, we offer dedicated licenses and professional support.

Compare licensing options

PM4Py in Action Visual Examples

A selection of features with visual output, each in just a few lines of Python.

Process Discovery

Discover process models from event data, from directly-follows graphs to Petri nets, BPMN models, and process trees.

Directly-follows graph with activity frequencies on its nodes and edges
Directly-follows frequenciesShows the observed order of activities and how often they follow each other in the event log
import pm4py
log = pm4py.read_xes("tests/input_data/running-example.xes")
dfg, starts, ends = pm4py.discover_dfg(log)
pm4py.save_vis_dfg(dfg, starts, ends, "visualization.svg", graph_title="Directly-follows frequencies")

More example scripts can be found online:Tutorials & ExamplesMore examples on GitHub

Licensing

PM4Py is available under two licensing options: an open-source license for academic and research purposes, and a closed-source license for commercial use.
PM4Py Community and Commercial Version compared
ComparisonCommunity VersionOpen-Source LicenseCommercial VersionClosed-Source License
Main User Groups
Main Use Case
License
Modifications
Covered Work1
Commercial Usage
Distribution
Release Cycle
Support
Pricing

1 A covered work (as defined in the AGPL) includes any software or script using PM4Py in any way, such as by importing or using its functionality. This applies regardless of whether PM4Py itself is modified. Furthermore, if a covered work is made accessible over a network (e.g., as a web service or API), the AGPL requires the source code to be made available to users of that service.

FAQ

Something else on your mind?

Get in touch

Licensing Basics

PM4Py started as an open-source project, and we want to keep a powerful set of process mining algorithms freely available for research, teaching, and open-source projects. That's why PM4Py is licensed under the GNU AGPL v3. Developing and maintaining a library like this requires ongoing resources, though. Companies that build proprietary software on PM4Py, and don't want to publish their source code under the AGPL, can get a commercial license instead. The license fees help fund PM4Py's continued development.

Yes, but only under the conditions of the GNU AGPL v3. If you distribute software that uses PM4Py, or make it available to users over a network, you must publish its source code under the AGPL as well. Most companies can't open-source their proprietary code, so they need a commercial license.

The AGPL in Detail

Yes. The AGPL applies to PM4Py whether or not you modify it, and software that imports or uses PM4Py is generally considered a work based on it. Its requirements, such as publishing your source code under the AGPL, apply when you distribute that software or, in certain cases, make it available to users over a network.

The AGPL defines a covered work as "either the unmodified Program or a work based on the Program". For PM4Py, this means PM4Py itself and software built on it, which generally includes scripts and applications that import PM4Py, whether or not you modify PM4Py.

The AGPL has a network clause (Section 13) for exactly this case. If you modify PM4Py or build it into your own software, and users interact with it over a network, you must offer the corresponding source code, even if you never distribute the software itself. This generally means the source code of your entire application, not only PM4Py. If you don't want to publish your source code, you'll need a commercial license.

Commercial Version

The Commercial Version adds four things:
  • Use in proprietary software: you can build PM4Py into closed-source products and services without publishing your source code.
  • Early access: you get new features before they reach the Community Version.
  • Regular releases: updates follow a fixed release cycle, so you can plan upgrades.
  • Professional support: our team is available to help when you need it.

Yes. Our startup licensing lets you build PM4Py into your product right away and only start paying license fees as your business grows. We agree on the terms together upfront, so you know exactly what to expect. Contact us to find the right setup for you.

Please contact us at info@processintelligence.solutions, and we will provide you with an evaluation license specific to this purpose.

About PM4Py

PM4Py is a Python library for developers who build their own process mining applications. PMTk is a no-code application for business teams who want to analyze processes without programming. Both are developed by the same team and complement each other. Not sure which one is right for you? Contact us

PM4Py was originally developed at Fraunhofer FIT. Since 2024, its spin-off Process Intelligence Solutions GmbH has been fully responsible for PM4Py, including its development, maintenance, distribution, and licensing.

We welcome contributions from the community! Our contribution guidelines explain how to get started.