pm4py.objects.log.importer.xes package

Submodules

pm4py.objects.log.importer.xes.importer module

class pm4py.objects.log.importer.xes.importer.Variants(value)[source]

Bases: enum.Enum

An enumeration.

ITERPARSE = <module 'pm4py.objects.log.importer.xes.variants.iterparse' from 'C:\\Users\\berti\\FRAUNHOFER\\pm4py-core\\pm4py\\objects\\log\\importer\\xes\\variants\\iterparse.py'>
ITERPARSE_MEM_COMPRESSED = <module 'pm4py.objects.log.importer.xes.variants.iterparse_mem_compressed' from 'C:\\Users\\berti\\FRAUNHOFER\\pm4py-core\\pm4py\\objects\\log\\importer\\xes\\variants\\iterparse_mem_compressed.py'>
LINE_BY_LINE = <module 'pm4py.objects.log.importer.xes.variants.line_by_line' from 'C:\\Users\\berti\\FRAUNHOFER\\pm4py-core\\pm4py\\objects\\log\\importer\\xes\\variants\\line_by_line.py'>
pm4py.objects.log.importer.xes.importer.apply(path, parameters=None, variant=<Variants.ITERPARSE: <module 'pm4py.objects.log.importer.xes.variants.iterparse' from 'C:\\Users\\berti\\FRAUNHOFER\\pm4py-core\\pm4py\\objects\\log\\importer\\xes\\variants\\iterparse.py'>>)[source]

Import a XES log into a EventLog object

Parameters
  • path – Log path

  • 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.INSERT_TRACE_INDICES -> Specify if trace indexes should be added as event attribute for each event Parameters.MAX_TRACES -> Specify the maximum number of traces to import from the log (read in order in the XML file)

  • variant

    Variant of the algorithm to use, including:
    • Variants.ITERPARSE

    • Variants.LINE_BY_LINE

Returns

Trace log object

Return type

log

pm4py.objects.log.importer.xes.importer.deserialize(log_string, parameters=None, variant=<Variants.ITERPARSE: <module 'pm4py.objects.log.importer.xes.variants.iterparse' from 'C:\\Users\\berti\\FRAUNHOFER\\pm4py-core\\pm4py\\objects\\log\\importer\\xes\\variants\\iterparse.py'>>)[source]

Deserialize a text/binary string representing a XES log

Parameters
  • log_string – String that contains the XES

  • 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.INSERT_TRACE_INDICES -> Specify if trace indexes should be added as event attribute for each event Parameters.MAX_TRACES -> Specify the maximum number of traces to import from the log (read in order in the XML file)

  • variant

    Variant of the algorithm to use, including:
    • Variants.ITERPARSE

    • Variants.LINE_BY_LINE

Returns

Trace log object

Return type

log

Module contents