means.io package¶
Submodules¶
-
class
means.io.latex.
LatexPrintableObject
[source]¶ Bases:
object
-
latex
¶ Returns the latex text that could be printed into .tex document :return:
-
-
means.io.sbml.
read_sbml
(filename)[source]¶ Read the model from a SBML file.
Parameters: filename – SBML filename to read the model from Returns: A tuple, consisting of Model
instance, set of parameter values, and set of initial conditions variables.
-
class
means.io.serialise.
MeansDumper
(stream, default_style=None, default_flow_style=None, canonical=None, indent=None, width=None, allow_unicode=None, line_break=None, encoding=None, explicit_start=None, explicit_end=None, version=None, tags=None)[source]¶ Bases:
yaml.dumper.Dumper
-
class
means.io.serialise.
SerialisableObject
[source]¶ Bases:
yaml.YAMLObject
Module contents¶
Module for Input/Output operations.¶
Human Readable Serialisation¶
The module implements common methods to serialise and deserialise MEANS objects.
Namely the module provides functions means.io.dump()
and means.io.load()
that would
serialise and deserialise the said objects into yaml
format.
These serialised representations can be written to or read from files with the help of
means.io.to_file()
and means.io.from_file()
functions.
For the user’s convenience, the said methods are also attached to all serialisable objects,
e.g. means.core.Model.from_file()
method would allow the user
to read means.core.Model
object from file directly.
Binary Serialisation¶
We do not provide any convenience functions for binary serialisation of the object, because pickle
package,
which is in the default distribution of Python, has no problems of performing these tasks on MEANS objects.
We recommend using pickle
, rather than means.io
whenever fast serialisation is preferred to human
readability.
SBML¶
This module also provides support for the input from SBML files.
If the libsbml
is installed in the user’s system and has the appropriate python bindings,
the function means.io.read_sbml()
can be used to parse the files in SBML format
to means.core.Model
objects.