pm4py.objects.petri_net.exporter.variants.pnml 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.petri_net.exporter.variants.pnml.Parameters(*values)[source]#
Bases:
Enum- ENCODING = 'encoding'#
- pm4py.objects.petri_net.exporter.variants.pnml.export_petri_tree(petrinet, marking, final_marking=None, export_prom5=False, parameters=None)[source]#
Export a Petrinet to a XML tree
- Parameters:
petrinet (
pm4py.entities.petri.petrinet.PetriNet) – Petri netmarking (
pm4py.entities.petri.petrinet.Marking) – Markingfinal_marking (
pm4py.entities.petri.petrinet.Marking) – Final marking (optional)export_prom5 – Enables exporting PNML files in a format that is ProM5-friendly
parameters – Other parameters of the algorithm
- Returns:
XML tree
- Return type:
tree
- pm4py.objects.petri_net.exporter.variants.pnml.export_petri_as_string(petrinet, marking, final_marking=None, export_prom5=False, parameters=None)[source]#
- Parameters:
petrinet (
pm4py.entities.petri.petrinet.PetriNet) – Petri netmarking (
pm4py.entities.petri.petrinet.Marking) – Markingfinal_marking (
pm4py.entities.petri.petrinet.Marking) – Final marking (optional)export_prom5 – Enables exporting PNML files in a format that is ProM5-friendly
- Returns:
Petri net as string
- Return type:
string
- pm4py.objects.petri_net.exporter.variants.pnml.export_net(petrinet, marking, output_filename, final_marking=None, export_prom5=False, parameters=None)[source]#
Export a Petrinet to a PNML file
- Parameters:
petrinet (
pm4py.entities.petri.petrinet.PetriNet) – Petri netmarking (
pm4py.entities.petri.petrinet.Marking) – Markingfinal_marking (
pm4py.entities.petri.petrinet.Marking) – Final marking (optional)output_filename – Absolute output file name for saving the pnml file
export_prom5 – Enables exporting PNML files in a format that is ProM5-friendly