pm4py.utils.serialize#
- pm4py.utils.serialize(*args) Tuple[str, bytes] [source]#
Serializes a PM4Py object into a bytes string.
- Parameters:
args – PM4Py object(s) to serialize. Supported types include: - An EventLog object. - A Pandas DataFrame object. - A tuple consisting of (PetriNet, Marking, Marking). - A ProcessTree object. - A BPMN object. - A DFG, including the dictionary of directly-follows relations, start activities, and end activities.
- Returns:
A tuple containing the serialization type as a string and the serialized bytes.
- Return type:
Tuple[str, bytes]
import pm4py net, im, fm = pm4py.discover_petri_net_inductive(dataframe) serialization = pm4py.serialize(net, im, fm)