skillfed

python-libsbml

LibSBML Python API

python-libsbml v5.21.1 143.5K downloads/30d#11,175 on PyPI
Copyleft license LGPL Active released

What it is and what it does

python-libsbml is a Python wrapper around the libSBML C/C++ library, enabling programmatic access to Systems Biology Markup Language documents. SBML is a standard XML-based format for representing computational models in systems biology, used to exchange models of biological processes across tools and research groups. The package lets you load SBML files, inspect and modify model structure (species, reactions, parameters, compartments), validate against SBML specifications, and write modified models back to disk.

The library is maintained as part of the broader libSBML project and has been in active development since 2014. It ships as pre-compiled wheels for modern Python versions on common platforms, avoiding the need to compile C/C++ code locally in most cases. There are no runtime Python dependencies; the package is self-contained once installed.

Use it for:

  • Load and parse SBML model files to extract reaction networks and parameter values for analysis or simulation.
  • Programmatically construct or modify biological models in SBML format for automated model generation workflows.
  • Validate SBML documents against specification rules to catch structural or semantic errors before use.
  • Convert or translate between SBML levels or integrate SBML models into larger computational biology pipelines.
  • Inspect model metadata and annotations to extract biological context or cross-references embedded in SBML documents.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides Python bindings to read, write, and manipulate Systems Biology Markup Language (SBML) documents, supporting SBML Levels 1, 2, and 3.

Yes, if you work with SBML models in systems biology or computational biology research. The package is actively maintained, has no known vulnerabilities, and offers stable wheels across major platforms and Python versions. The copyleft license is standard for research tools; verify compatibility with your project's licensing if proprietary integration is planned. Install friction is moderate but manageable via pre-built wheels.

Install

python-libsbml on PyPI

pip

pip install python-libsbml

uv

uv add python-libsbml

poetry

poetry add python-libsbml

Installing python-libsbml

Before you install

Medium install friction due to compiled C/C++ bindings; pre-built wheels available for Python 3.10–3.13 across Linux, macOS (Intel and ARM), and Windows. Last release 158 days ago with active maintenance status.

License in practice

Licensed under LGPL (copyleft); derivative works and modifications must be distributed under compatible terms. Suitable for research and open-source projects; review licensing requirements if integrating into proprietary software.

Quickstart

import libsbml

document = libsbml.readSBML('model.xml')
model = document.getModel()

Requires a pre-built wheel matching your Python version and platform; source builds require C/C++ compiler and development headers.

Verify before relying

  • Whether python_support field being unspecified reflects actual support scope or metadata gap.
  • Availability of comprehensive documentation and examples for SBML Level 3 workflows.
  • Performance characteristics when handling large or complex SBML models.

Package facts

License LGPL (copyleft)
Python support not specified
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 158 days since the last release
First released
Downloads 143,474/month — #11,175 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: python_libsbml-5.21.1-cp310-cp310-macosx_10_9_x86_64.whl; python_libsbml-5.21.1-cp310-cp310-macosx_11_0_arm64.whl; python_libsbml-5.21.1-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; python_libsbml-5.21.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; python_libsbml-5.21.1-cp310-cp310-win_amd64.whl; python_libsbml-5.21.1-cp310-cp310-win_arm64.whl; python_libsbml-5.21.1-cp311-cp311-macosx_10_9_x86_64.whl; python_libsbml-5.21.1-cp311-cp311-macosx_11_0_arm64.whl; python_libsbml-5.21.1-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; python_libsbml-5.21.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; python_libsbml-5.21.1-cp311-cp311-win_amd64.whl; python_libsbml-5.21.1-cp311-cp311-win_arm64.whl; python_libsbml-5.21.1-cp312-cp312-macosx_10_13_x86_64.whl; python_libsbml-5.21.1-cp312-cp312-macosx_11_0_arm64.whl; python_libsbml-5.21.1-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; python_libsbml-5.21.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; python_libsbml-5.21.1-cp312-cp312-win_amd64.whl; python_libsbml-5.21.1-cp312-cp312-win_arm64.whl; python_libsbml-5.21.1-cp313-cp313-macosx_10_13_x86_64.whl; python_libsbml-5.21.1-cp313-cp313-macosx_11_0_arm64.whl

Tags

SBML parser pythonsystems biology markup languageread write SBML filesSBML document manipulationbiological model formatsbml library python
systems-biologyxml-markupbioinformatics

More Scientific/Engineering packages