pm4py.objects.log.importer.xes.variants.chunk_regex 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

class pm4py.objects.log.importer.xes.variants.chunk_regex.Parameters(*values)[source]#

Bases: Enum

DECOMPRESS_SERIALIZATION = 'decompress_serialization'#
ENCODING = 'encoding'#
pm4py.objects.log.importer.xes.variants.chunk_regex.apply(filename, parameters=None)[source]#
pm4py.objects.log.importer.xes.variants.chunk_regex.import_log_from_file_object(F, encoding, file_size=9223372036854775807, parameters=None)[source]#

Import a log object from a (XML) file object

Parameters:
  • F – file object

  • encoding – Encoding

  • file_size – Size of the file (measured on disk)

  • parameters – Parameters of the algorithm

Returns:

Log file

Return type:

log

pm4py.objects.log.importer.xes.variants.chunk_regex.import_log(filename, parameters=None)[source]#

Import a log object from a XML file containing the traces, the events and the simple attributes of them.

Parameters:
  • filename – XES file to parse

  • parameters – Parameters of the algorithm, including:

    • Parameters.TIMESTAMP_SORT: Specify if we should sort log by timestamp.

    • Parameters.TIMESTAMP_KEY: If sort is enabled, then sort the log by using this key.

    • Parameters.REVERSE_SORT: Specify in which direction the log should be sorted.

    • Parameters.MAX_TRACES: Specify the maximum number of traces to import.

    • Parameters.MAX_BYTES: Maximum number of bytes to read.

    • Parameters.SKYP_BYTES: Number of bytes to skip.

    • Parameters.SET_ATTRIBUTES_TO_READ: Names of the attributes that should be parsed. If not specified, then all attributes are parsed.

    • Parameters.ENCODING: Regulates the encoding of the log (default: utf-8).

Returns:

Log file

Return type:

log

pm4py.objects.log.importer.xes.variants.chunk_regex.import_from_string(log_string, parameters=None)[source]#

Deserialize a text/binary string representing a XES log

Parameters:
  • log_string – String that contains the XES

  • parameters – Parameters of the algorithm

Returns:

Trace log object

Return type:

log