pm4py.utils.serialize#

pm4py.utils.serialize(*args) Tuple[str, bytes][source]#

Serialize a PM4Py object into a bytes string

Parameters:

args – A PM4Py object, among: - an EventLog object - a Pandas dataframe object - a (Petrinet, Marking, Marking) tuple - a ProcessTree object - a BPMN object - a DFG, including the dictionary of the directly-follows relations, the start activities and the end activities

Return type:

Tuple[str, bytes]

import pm4py

net, im, fm = pm4py.discover_petri_net_inductive(dataframe)
serialization = pm4py.serialize(net, im, fm)