PyStack't (pystackt
) is a Python package based on Stack't that supports data preparation for object-centric process mining.
PyStack't is published on PyPi and can be installed using pip.
pip install pystackt
- Extensive documentation is available via GitHub pages.
- A demo video on Youtube can walk you throught the different functionalities.
PyStack't creates DuckDB database files. From DuckDB version 1.2.1 onwards, you can explore them using the UI extension. Below code will load the UI by navigating to http://localhost:4213
in your default browser.
import duckdb
with duckdb.connect("./stackt.duckdb") as quack:
quack.sql("CALL start_ui()")
input("Press Enter to close the connection...")
Alternatively, you can use a database manager. You can follow this DuckDB guide to download and install DBeaver for easy access.
⛏️🐙 Extract object-centric event log from GitHub repo (get_github_log
)
from pystackt import *
get_github_log(
GITHUB_ACCESS_TOKEN="insert_your_github_access_token_here",
repo_owner="LienBosmans",
repo_name="stack-t",
max_issues=None, # None returns all issues, can also be set to an integer to extract a limited data set
quack_db="./stackt.duckdb",
schema="main"
)
📈 Interactive data exploration (start_visualization_app
)
from pystackt import *
prepare_graph_data( # only needed once
quack_db="./stackt.duckdb",
schema_in="main",
schema_out="graph_data_prep"
)
start_visualization_app(
quack_db="./stackt.duckdb",
schema="graph_data_prep"
)
📤 Export to OCEL 2.0 (export_to_ocel2
)
from pystackt import *
export_to_ocel2(
quack_db="./stackt.duckdb",
schema_in="main",
schema_out="ocel2",
sqlite_db="./ocel2_stackt.sqlite"
)
We welcome any improvements, big and small, as well as new functionality that supports data preparation for object-centric process mining! For more information, please read the Contributing Guide.