pm4py.write.write_pnml(petri_net: PetriNet, initial_marking: Marking, final_marking: Marking, file_path: str) None[source]#

Writes a Petri net object to disk in the .pnml format (see pnml-standard)

  • petri_net (PetriNet) – Petri net object that needs to be written to disk

  • initial_marking (Marking) – initial marking of the Petri net

  • final_marking (Marking) – final marking of the Petri net

  • file_path (str) – target file path on disk of the .pnml file

import pm4py

log = pm4py.write_pnml(pn, im, fm, '<path_to_export_to>')