Skip to main content

sbmlsim-core

Compile SBML models to WebAssembly and simulate them. sbmlsim-core compiles an SBML model into a WebAssembly module (model.wasm with its description model.json) and simulates it with its engine (engine.wasm: CVODE and IDA of SUNDIALS with the sparse solver KLU), with the semantics of sbmlsim and bitwise the same results on every host. This package is its python host: the compiler and the engine in one extension, run on wasmtime, so a model compiled here runs unchanged in a browser with the JavaScript host of the npm package sbmlsim-core.

Install

pip install sbmlsim-core

One abi3 wheel per platform for python 3.12 or newer: linux (x86_64, aarch64, manylinux_2_28), macOS (arm64, x86_64) and windows (x86_64). There is no source distribution; a build from source is described in the repository.

Compile and simulate

The compiler reads SBML Level 3 (version 1 or 2) core, flat and without a required package but distrib, whose uncertainties of a fitted parameter annotate it and are ignored.

import sbmlsim_core

compiled = sbmlsim_core.compile_sbml(sbml_text)  # optimize=True, jacobian="auto"
compiled.wasm  # the bytes of model.wasm
compiled.description  # the dict of model.json (model/2)

# engine.wasm and mathlib.wasm, compiled once per runtime: share it
runtime = sbmlsim_core.Runtime(max_memory_bytes=None)
model = runtime.load(compiled.wasm, compiled.description)
instance = model.instance()  # one per thread
out = instance.simulate(request)  # request: a dict of simulation/1
out.columns, out.values  # names, float64 array (rows, columns)
# a batch on rayon threads, the results in the order of the requests
results = model.simulate_many(requests, threads=None)

model.wasm and model.json written from compiled.wasm and compiled.description are what the JavaScript host loads, so a model compiled in python is simulated in a page without a server. The request and its fields, the errors and the semantics are documented on the pages of sbmlsim-core.

sbmlsim_core.web.figure_script() is the script of a static report whose <figure data-figure="KEY"> elements hold an inline SVG and a child <script type="application/json" data-figure-spec="KEY"> with its figure/1 spec: the inline build plus the renderer (plot_wasm()) as base64, which makes the figures interactive (legend toggles, selection, read-out) when the page loads, with no network.

sbmlsim_core.chart builds the figures in python, pure python on numpy: a Chart of plots (ChartPlot, ChartAxis) whose curves, bands, bars, heat maps, contours, texts and colour bars take sequences, numpy arrays, quantities of pint and data arrays of xarray (both optional, read by duck typing), drawn with chart.svg(), chart.png() or chart.save("figure.svg"), see Charts.

License

MIT for the code of sbmlsim-core. The extension embeds engine.wasm, which links SUNDIALS (BSD-3-Clause) and KLU and BTF of SuiteSparse (LGPL-2.1-or-later), so the wheel is under MIT AND BSD-3-Clause AND LGPL-2.1-or-later and carries LICENSE and THIRD_PARTY.md.

Standalone ODE exports use from sbmlsim_core import OdeSystem. Read original SBML bytes or a path with OdeSystem.from_sbml, then render("python") or write("model.md"). Seven targets share the Rust generator; see ODE source exports.

Metadata

Release files for sbmlsim-core 0.40.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for sbmlsim-core 0.40.0
File Actions
sbmlsim_core-0.40.0-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details for sbmlsim_core-0.40.0-cp312-abi3-win_amd64.whl
sbmlsim_core-0.40.0-cp312-abi3-manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64 Details for sbmlsim_core-0.40.0-cp312-abi3-manylinux_2_28_x86_64.whl
sbmlsim_core-0.40.0-cp312-abi3-manylinux_2_28_aarch64.whl CPython 3.12 abi3 Linux glibc 2.28+ ARM64 Details for sbmlsim_core-0.40.0-cp312-abi3-manylinux_2_28_aarch64.whl
sbmlsim_core-0.40.0-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details for sbmlsim_core-0.40.0-cp312-abi3-macosx_11_0_arm64.whl
sbmlsim_core-0.40.0-cp312-abi3-macosx_10_12_x86_64.whl CPython 3.12 abi3 macOS 10.12+ x86-64 Details for sbmlsim_core-0.40.0-cp312-abi3-macosx_10_12_x86_64.whl

Total release size: 73.2 MB

Release files / sbmlsim_core-0.40.0-cp312-abi3-win_amd64.whl

Download URL sbmlsim_core-0.40.0-cp312-abi3-win_amd64.whl
Size 14.8 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
1b4cf2aabf04f8d20067be2f1aaa8db2195c950fcd83a29d0432330801cb4d5c
BLAKE2b-256 checksum
How to use checksums
c287ac5547f9c53d5a1655ae7a21e4bb095446aac20536557f4ec82afc44a171
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / sbmlsim_core-0.40.0-cp312-abi3-manylinux_2_28_x86_64.whl

Download URL sbmlsim_core-0.40.0-cp312-abi3-manylinux_2_28_x86_64.whl
Size 14.9 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
222592e623a671c28aead3a9c84a7a2adb8b010ddd9afabb8bd3091609dd0066
BLAKE2b-256 checksum
How to use checksums
59d5e27ecf96534dbf757c67b55696667b76735b55d5d8b9c849450de1ccf1a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / sbmlsim_core-0.40.0-cp312-abi3-manylinux_2_28_aarch64.whl

Download URL sbmlsim_core-0.40.0-cp312-abi3-manylinux_2_28_aarch64.whl
Size 13.6 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
0683c966a2d6299091bc236bd3c34f60c0684e5aeef668580f2c1737f516e51f
BLAKE2b-256 checksum
How to use checksums
97ab4eec077875a0c369d21bcf7376450b7be097e890b880d47c2167521ef34c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / sbmlsim_core-0.40.0-cp312-abi3-macosx_11_0_arm64.whl

Download URL sbmlsim_core-0.40.0-cp312-abi3-macosx_11_0_arm64.whl
Size 14.5 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
47d034f4285147d183ab937e945bd8380588272ce08b57d7686a6fdfd1c2a337
BLAKE2b-256 checksum
How to use checksums
c0fe904314cea381b66c62177c1badd39b4469b0fb21adedfb69fe3ede101a3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / sbmlsim_core-0.40.0-cp312-abi3-macosx_10_12_x86_64.whl

Download URL sbmlsim_core-0.40.0-cp312-abi3-macosx_10_12_x86_64.whl
Size 15.5 MB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
62b996c654db5b82e4fdca76bb51549df85ad6ff21eb019960bfd5466ac18a2d
BLAKE2b-256 checksum
How to use checksums
c51a719b58d5d2b784e2af84883f7c3cf0bedef38924f647b9e63371d8e0b2f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for sbmlsim-core 0.40.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for sbmlsim_core-0.40.0-cp312-abi3-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.40.0 This release

5 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page