Export SBML (pysb.export.sbml)

Module containing a class for exporting a PySB model to SBML using libSBML

For information on how to use the model exporters, see the documentation for pysb.export.

class pysb.export.sbml.SbmlExporter(*args, **kwargs)[source]

A class for returning the SBML for a given PySB model.

Inherits from pysb.export.Exporter, which implements basic functionality for all exporters.

convert(self, level=(3, 2))[source]

Convert the PySB model to a libSBML document

Requires the libsbml python package

Parameters:
level: (int, int)

The SBML level and version to use. The default is SBML level 3, version 2. Conversion to other levels/versions may not be possible or may lose fidelity.

Returns:
libsbml.SBMLDocument

A libSBML document converted form the PySB model

export(self, level=(3, 2))[source]

Export the SBML for the PySB model associated with the exporter

Requires libsbml package.

Parameters:
level: (int, int)

The SBML level and version to use. The default is SBML level 3, version 2. Conversion to other levels/versions may not be possible or may lose fidelity.

Returns:
string

String containing the SBML output.