Skip to main content

FlowMine — process mining for Python

FlowMine turns an event log (one row per activity: case id, activity, timestamp) into a process map, performance metrics and AutoInsights: an automatic check of every activity for bottlenecks, rework, loops, one-off incidents, growing durations and rare steps, each with the time it costs and a money estimate at your hourly rate.

What sets it apart from general process-mining libraries:

  • AutoInsights with an effect estimate — one explained finding per activity (AutoInsights.findings()), in Russian or English.
  • Russian-first data handling — dd.mm.yyyy dates, cp1251 files, Russian log messages (switchable to English).
  • Simulation and ML helpers — process simulation (flowmine.imitation), missing value imputation, NLP helpers for free-text columns (flowmine[nlp]).

For a web UI on top of this library, see FlowMine Studio.

Install

pip install flowmine              # core
pip install "flowmine[nlp]"       # + torch/transformers text features
pip install "flowmine[embeddings]"  # + graph-embedding loop detection (gensim, catboost)
pip install "flowmine[full]"      # everything

Graphviz drawing (GraphvizPainter) also needs the Graphviz executables on your PATH: https://graphviz.org/download/

Quick start

import pandas as pd
from flowmine import DataHolder
from flowmine.autoinsights import AutoInsights
from flowmine.miners import HeuMiner

df = pd.DataFrame({
    "case":     ["c1", "c1", "c1", "c2", "c2", "c2", "c2", "c2"],
    "activity": ["Submit", "Check", "Approve", "Submit", "Check", "Request info", "Check", "Approve"],
    "start":    pd.to_datetime([
        "2026-03-01 09:00", "2026-03-01 09:30", "2026-03-01 11:00",
        "2026-03-02 10:00", "2026-03-02 10:20", "2026-03-02 12:00",
        "2026-03-03 09:00", "2026-03-03 10:00",
    ]),
})

holder = DataHolder(df, col_case="case", col_stage="activity", col_start_time="start")

miner = HeuMiner(holder)
miner.apply()                      # miner.graph: the discovered process model

insights = AutoInsights(holder, min_cost=50 / 60)   # cost of one minute of work
insights.apply()
for finding in insights.findings(lang="en"):
    print(finding["stage"], [r["title"] for r in finding["reasons"]], finding["financial_effect"])
print(insights.fin_effects_summary(lang="en", currency="USD"))

Data can also be a path: .csv, .xlsx, .txt or .xes / .xes.gz (flowmine.read_xes() reads XES into a DataFrame).

What's inside

Module Contents
flowmine.baza DataHolder (log parsing, time formats, durations, success flags), read_xes
flowmine.miners SimpleMiner (DFG), HeuMiner, AlphaMiner, AlphaPlusMiner, InductiveMiner, ClusterMiner
flowmine.metrics activity, transition, trace, case and resource metrics
flowmine.autoinsights AutoInsights: findings per activity, effect estimate, text summary
flowmine.visual Graphviz and matplotlib painters, plotly charts (ChartPainter)
flowmine.bpmn BPMN 2.0 import and export
flowmine.imitation process simulation
flowmine.ml, flowmine.nlp imputation; text classification and QA extraction ([nlp])

Language

Log messages are in Russian by default. For English:

export FLOWMINE_LANG=en        # or: flowmine.set_language("en")

AutoInsights.findings() and fin_effects_summary() take lang="ru" / lang="en".

Changes

See CHANGELOG.md.

License

MIT. © FlowMine Contributors.

Release files for flowmine 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flowmine 1.2.1
File Size Uploaded
flowmine-1.2.1.tar.gz 185.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flowmine 1.2.1
File Interpreter ABI Platform
flowmine-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 422.4 kB

Release files / flowmine-1.2.1.tar.gz

Download URL flowmine-1.2.1.tar.gz
Size 185.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4863808ad97e7223e009fa6cf3cb76180696715c74712f24f2a64c8bd8b7bf35
BLAKE2b-256 checksum
How to use checksums
0cc85edae05ff84ef31ea5ac27136adf36ad27d55f3874bb0ebdfc66e46dd07b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / flowmine-1.2.1-py3-none-any.whl

Download URL flowmine-1.2.1-py3-none-any.whl
Size 236.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
67eb1fb0f7cc0361ed697f6dbc872116fec8119af3894037f438736e83095b9e
BLAKE2b-256 checksum
How to use checksums
b62a2c83b7cab15d5f19713094af485391b0e6856365f8dd7672c054f47a0132
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files

1.0.0

2 release files

0.1.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page