Installation¶
sbmlutils requires python >= 3.11 and is available from pypi. It is tested on Linux, macOS and Windows.
With uv¶
uv is the recommended way to install the package. In a project it is added as a dependency, which resolves and locks it together with the rest of the environment:
Into an existing virtual environment it is installed through the pip interface of uv:
With pip¶
Development version¶
The current state of the develop branch is installed directly from GitHub:
or, with pip,
To work on the repository itself, with the test and documentation tooling, see Development.
Extras¶
sbmlutils reads, writes, annotates and validates models; it neither simulates nor plots, so the packages for that are not installed with it. Three extras add what a specific feature needs:
| extra | install | what it adds |
|---|---|---|
cytoscape |
pip install sbmlutils[cytoscape] |
py4cytoscape for the visualization in a running Cytoscape |
cobra |
pip install sbmlutils[cobra] |
cobra for the flux balance analysis of sbmlutils.fbc.cobra |
examples |
pip install sbmlutils[examples] |
libroadrunner and matplotlib, which the examples simulate and plot with |
Several are combined as usual: pip install sbmlutils[cytoscape,examples]. The development environment installs cytoscape and examples with uv sync --extra dev, see Development.
Without the cytoscape extra sbmlutils.cytoscape still imports; its functions log a warning and do nothing, just as they do when Cytoscape is not running.
Logging¶
sbmlutils does not configure logging. It logs to loggers below the sbmlutils logger and leaves handlers, levels and formatting to the application, so the messages of the package stay under your control:
import logging
logging.basicConfig(level=logging.INFO)
logging.getLogger("sbmlutils").setLevel(logging.WARNING)
For scripts and interactive work the rich output of the package can be turned on explicitly: