pm4py.connectors module#

PM4Py – A Process Mining Library for Python Copyright (C) 2026 Process Intelligence Solutions GmbH

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see this software project’s root or visit <https://www.gnu.org/licenses/>.

Website: https://processintelligence.solutions Contact: info@processintelligence.solutions

pm4py.connectors.extract_log_outlook_mails() → DataFrame[source]#

Extracts the history of conversations from the local instance of Microsoft Outlook running on the current computer.

Columns:

  • CASE ID (case:concept:name): Identifier of the conversation.

  • ACTIVITY (concept:name): Activity performed in the current item (e.g., send e-mail, receive e-mail, refuse meeting).

  • TIMESTAMP (time:timestamp): Timestamp of creation of the item in Outlook.

  • RESOURCE (org:resource): Sender of the current item.

See Also:

Return type:

pd.DataFrame

Example:

import pm4py

dataframe = pm4py.connectors.extract_log_outlook_mails()
pm4py.connectors.extract_log_outlook_calendar(email_user: str | None = None, calendar_id: int = 9) → DataFrame[source]#

Extracts the history of calendar events (creation, update, start, end) into a Pandas DataFrame from the local Outlook instance running on the current computer.

Columns:

  • CASE ID (case:concept:name): Identifier of the meeting.

  • ACTIVITY (concept:name): One of the following activities: Meeting Created, Last Change of Meeting, Meeting Started, Meeting Completed.

  • TIMESTAMP (time:timestamp): Timestamp of the event.

  • case:subject: Subject of the meeting.

Parameters:
  • email_user – (optional) E-mail address from which the (shared) calendar should be extracted.

  • calendar_id – Identifier of the calendar for the given user (default: 9).

Return type:

pd.DataFrame

import pm4py

# Extract using default parameters
dataframe = pm4py.connectors.extract_log_outlook_calendar()

# Extract using a specific email user
dataframe = pm4py.connectors.extract_log_outlook_calendar("vacation-calendar@workplace.eu")
pm4py.connectors.extract_log_windows_events() → DataFrame[source]#

Extracts a process mining DataFrame from all events recorded in the Windows registry.

Columns:

Return type:

pd.DataFrame

import pm4py

dataframe = pm4py.connectors.extract_log_windows_events()
pm4py.connectors.extract_log_chrome_history(history_db_path: str | None = None) → DataFrame[source]#

Extracts a DataFrame containing the navigation history of Google Chrome. Please ensure that Google Chrome history is closed when extracting.

Columns:

  • CASE ID (case:concept:name): Identifier of the extracted profile.

  • ACTIVITY (concept:name): Complete path of the website, excluding GET arguments.

  • TIMESTAMP (time:timestamp): Timestamp of the visit.

Parameters:

history_db_path – Path to the Google Chrome history database (default: location of the Windows folder).

Return type:

pd.DataFrame

import pm4py

dataframe = pm4py.connectors.extract_log_chrome_history()
pm4py.connectors.extract_log_firefox_history(history_db_path: str | None = None) → DataFrame[source]#

Extracts a DataFrame containing the navigation history of Mozilla Firefox. Please ensure that Mozilla Firefox history is closed when extracting.

Columns:

  • CASE ID (case:concept:name): Identifier of the extracted profile.

  • ACTIVITY (concept:name): Complete path of the website, excluding GET arguments.

  • TIMESTAMP (time:timestamp): Timestamp of the visit.

Parameters:

history_db_path – Path to the Mozilla Firefox history database (default: location of the Windows folder).

Return type:

pd.DataFrame

import pm4py

dataframe = pm4py.connectors.extract_log_firefox_history()
pm4py.connectors.extract_log_github(owner: str = 'pm4py', repo: str = 'pm4py-core', auth_token: str | None = None) → DataFrame[source]#

Extracts a DataFrame containing the history of issues from a GitHub repository. Due to API rate limits for public and registered users, only a subset of events may be returned.

Parameters:
  • owner – Owner of the repository (e.g., pm4py).

  • repo – Name of the repository (e.g., pm4py-core).

  • auth_token – Authorization token.

Return type:

pd.DataFrame

import pm4py

dataframe = pm4py.connectors.extract_log_github(owner='pm4py', repo='pm4py-core')
pm4py.connectors.extract_log_camunda_workflow(connection_string: str) → DataFrame[source]#

Extracts a DataFrame from the Camunda workflow system. In addition to traditional columns, the process ID of the process in Camunda is included.

Parameters:

connection_string – ODBC connection string to the Camunda database.

Return type:

pd.DataFrame

import pm4py

dataframe = pm4py.connectors.extract_log_camunda_workflow(
    'Driver={PostgreSQL Unicode(x64)};SERVER=127.0.0.3;DATABASE=process-engine;UID=xx;PWD=yy'
)
pm4py.connectors.extract_log_sap_o2c(connection_string: str, prefix: str = '') → DataFrame[source]#

Extracts a DataFrame for the SAP Order-to-Cash (O2C) process.

Parameters:
  • connection_string – ODBC connection string to the SAP database.

  • prefix – Prefix for the tables (e.g., SAPSR3.).

Return type:

pd.DataFrame

import pm4py

dataframe = pm4py.connectors.extract_log_sap_o2c(
    'Driver={Oracle in instantclient_21_6};DBQ=127.0.0.3:1521/ZIB;UID=xx;PWD=yy'
)
pm4py.connectors.extract_log_sap_accounting(connection_string: str, prefix: str = '') → DataFrame[source]#

Extracts a DataFrame for the SAP Accounting process.

Parameters:
  • connection_string – ODBC connection string to the SAP database.

  • prefix – Prefix for the tables (e.g., SAPSR3.).

Return type:

pd.DataFrame

import pm4py

dataframe = pm4py.connectors.extract_log_sap_accounting(
    'Driver={Oracle in instantclient_21_6};DBQ=127.0.0.3:1521/ZIB;UID=xx;PWD=yy'
)
pm4py.connectors.extract_ocel_outlook_mails() → OCEL[source]#

Extracts the history of conversations from the local instance of Microsoft Outlook running on the current computer as an object-centric event log.

Columns:

  • ACTIVITY (ocel:activity): Activity performed in the current item (e.g., send e-mail, receive e-mail, refuse meeting).

  • TIMESTAMP (ocel:timestamp): Timestamp of creation of the item in Outlook.

Object Types:

  • org:resource: Sender of the mail.

  • recipients: List of recipients of the mail.

  • topic: Topic of the discussion.

See Also:

Return type:

OCEL

import pm4py

ocel = pm4py.connectors.extract_ocel_outlook_mails()
pm4py.connectors.extract_ocel_outlook_calendar(email_user: str | None = None, calendar_id: int = 9) → OCEL[source]#

Extracts the history of calendar events (creation, update, start, end) as an object-centric event log from the local Outlook instance running on the current computer.

Columns:

  • ACTIVITY (ocel:activity): One of the following activities: Meeting Created, Last Change of Meeting, Meeting Started, Meeting Completed.

  • TIMESTAMP (ocel:timestamp): Timestamp of the event.

Object Types:

  • case:concept:name: Identifier of the meeting.

  • case:subject: Subject of the meeting.

Parameters:
  • email_user – (optional) E-mail address from which the (shared) calendar should be extracted.

  • calendar_id – Identifier of the calendar for the given user (default: 9).

Return type:

OCEL

import pm4py

# Extract using default parameters
ocel = pm4py.connectors.extract_ocel_outlook_calendar()

# Extract using a specific email user
ocel = pm4py.connectors.extract_ocel_outlook_calendar("vacation-calendar@workplace.eu")
pm4py.connectors.extract_ocel_windows_events() → OCEL[source]#

Extracts an object-centric event log from all events recorded in the Windows registry.

Columns:

Object Types:

  • categoryString: Translation of the subcategory. The translation is source-specific.

  • computerName: Name of the computer that generated the event.

  • eventIdentifier: Identifier of the event, specific to the source that generated the event log entry.

  • eventType: Event type classification (1=Error; 2=Warning; 3=Information; 4=Security Audit Success; 5=Security Audit Failure).

  • sourceName: Name of the source (application, service, driver, or subsystem) that generated the entry.

  • user: Username of the logged-on user when the event occurred. If the username cannot be determined, this will be NULL.

Return type:

OCEL

import pm4py

ocel = pm4py.connectors.extract_ocel_windows_events()
pm4py.connectors.extract_ocel_chrome_history(history_db_path: str | None = None) → OCEL[source]#

Extracts an object-centric event log containing the navigation history of Google Chrome. Please ensure that Google Chrome history is closed when extracting.

Columns:

  • ACTIVITY (ocel:activity): Complete path of the website, excluding GET arguments.

  • TIMESTAMP (ocel:timestamp): Timestamp of the visit.

Object Types:

  • case:concept:name: Profile of Chrome used to visit the site.

  • complete_url: Complete URL of the website.

  • url_wo_parameters: Complete URL excluding the part after ‘?’.

  • domain: Domain of the visited website.

Parameters:

history_db_path – Path to the Google Chrome history database (default: location of the Windows folder).

Return type:

OCEL

import pm4py

ocel = pm4py.connectors.extract_ocel_chrome_history()
pm4py.connectors.extract_ocel_firefox_history(history_db_path: str | None = None) → OCEL[source]#

Extracts an object-centric event log containing the navigation history of Mozilla Firefox. Please ensure that Mozilla Firefox history is closed when extracting.

Columns:

  • ACTIVITY (ocel:activity): Complete path of the website, excluding GET arguments.

  • TIMESTAMP (ocel:timestamp): Timestamp of the visit.

Object Types:

  • case:concept:name: Profile of Firefox used to visit the site.

  • complete_url: Complete URL of the website.

  • url_wo_parameters: Complete URL excluding the part after ‘?’.

  • domain: Domain of the visited website.

Parameters:

history_db_path – Path to the Mozilla Firefox history database (default: location of the Windows folder).

Return type:

OCEL

import pm4py

ocel = pm4py.connectors.extract_ocel_firefox_history()
pm4py.connectors.extract_ocel_github(owner: str = 'pm4py', repo: str = 'pm4py-core', auth_token: str | None = None) → OCEL[source]#

Extracts an object-centric event log containing the history of issues from a GitHub repository. Due to API rate limits for public and registered users, only a subset of events may be returned.

Columns:

  • ACTIVITY (ocel:activity): The event type (e.g., created, commented, closed, subscribed).

  • TIMESTAMP (ocel:timestamp): Timestamp of the event execution.

Object Types:

  • case:concept:name: URL of the events related to the issue.

  • org:resource: Involved resource.

  • case:repo: Repository in which the issue was created.

Parameters:
  • owner – Owner of the repository (e.g., pm4py).

  • repo – Name of the repository (e.g., pm4py-core).

  • auth_token – Authorization token.

Return type:

OCEL

import pm4py

ocel = pm4py.connectors.extract_ocel_github(owner='pm4py', repo='pm4py-core')
pm4py.connectors.extract_ocel_camunda_workflow(connection_string: str) → OCEL[source]#

Extracts an object-centric event log from the Camunda workflow system.

Columns:

  • ACTIVITY (ocel:activity): Activity performed within Camunda.

  • TIMESTAMP (ocel:timestamp): Timestamp of the activity execution.

Object Types:

  • case:concept:name: Identifier of the case.

  • processID: Process ID within Camunda.

  • org:resource: Resource involved in the activity.

Parameters:

connection_string – ODBC connection string to the Camunda database.

Return type:

OCEL

import pm4py

ocel = pm4py.connectors.extract_ocel_camunda_workflow(
    'Driver={PostgreSQL Unicode(x64)};SERVER=127.0.0.3;DATABASE=process-engine;UID=xx;PWD=yy'
)
pm4py.connectors.extract_ocel_sap_o2c(connection_string: str, prefix: str = '') → OCEL[source]#

Extracts an object-centric event log for the SAP Order-to-Cash (O2C) process.

Columns:

  • ACTIVITY (ocel:activity): Activity performed in the O2C process.

  • TIMESTAMP (ocel:timestamp): Timestamp of the activity execution.

Object Types:

  • case:concept:name: Identifier of the case.

  • org:resource: Resource involved in the activity.

Parameters:
  • connection_string – ODBC connection string to the SAP database.

  • prefix – Prefix for the tables (e.g., SAPSR3.).

Return type:

OCEL

import pm4py

ocel = pm4py.connectors.extract_ocel_sap_o2c(
    'Driver={Oracle in instantclient_21_6};DBQ=127.0.0.3:1521/ZIB;UID=xx;PWD=yy'
)
pm4py.connectors.extract_ocel_sap_accounting(connection_string: str, prefix: str = '') → OCEL[source]#

Extracts an object-centric event log for the SAP Accounting process.

Columns:

  • ACTIVITY (ocel:activity): Activity performed in the Accounting process.

  • TIMESTAMP (ocel:timestamp): Timestamp of the activity execution.

Object Types:

  • case:concept:name: Identifier of the case.

  • org:resource: Resource involved in the activity.

Parameters:
  • connection_string – ODBC connection string to the SAP database.

  • prefix – Prefix for the tables (e.g., SAPSR3.).

Return type:

OCEL

import pm4py

ocel = pm4py.connectors.extract_ocel_sap_accounting(
    'Driver={Oracle in instantclient_21_6};DBQ=127.0.0.3:1521/ZIB;UID=xx;PWD=yy'
)