FMPy
Simulate Functional Mock-up Units (FMUs) in Python
What it is and what it does
FMPy is a Python library for simulating Functional Mock-up Units (FMUs), which are standardized simulation components used across engineering and scientific modeling. It implements the FMI standard (versions 1.0, 2.0, and 3.0) and supports both Co-Simulation and Model Exchange modes, allowing you to load, inspect, and run FMU files directly from Python or via command-line tools. The library includes a graphical user interface for interactive exploration, a web app built on Dash for sharing simulations, and Jupyter Notebook integration for computational workflows.
Typical usage involves loading an FMU file, querying its metadata (variables, parameters, initial conditions), running a simulation over a time horizon, and analyzing or plotting the results. FMPy depends on numpy for numerical computation, lxml for XML parsing (FMU metadata), cmake for compiling C code FMUs, and several other utilities. It runs on Windows, Linux, and macOS and requires Python 3.10 or later.
Use it for:
- Simulate control systems or physical models packaged as FMUs in Python scripts for parameter studies or optimization loops.
- Inspect and debug FMU metadata and behavior interactively using the command-line tools or GUI without writing code.
- Create reproducible simulation notebooks in Jupyter for documentation, teaching, or collaborative engineering analysis.
- Share FMU simulations with non-technical stakeholders via the web app without requiring them to install Python or specialized tools.
- Compile and debug C code FMUs using generated CMake projects for model development and validation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
FMPy simulates Functional Mock-up Units (FMUs) conforming to FMI 1.0, 2.0, and 3.0 standards, supporting both Co-Simulation and Model Exchange modes via Python, command-line, GUI, or web interface.
Yes, with conditions. FMPy is actively maintained, has low install friction, and is the standard Python tool for FMI simulation. However, verify the license terms before use—the metadata shows 'unclear' treatment with no published SPDX identifier. If you work with FMU-based models or need FMI standard compliance in Python, this is the right choice; otherwise, it is not applicable.
Install
fmpy on PyPI
pip
pip install fmpyuv
uv add fmpypoetry
poetry add fmpyInstalling FMPy
Before you install
Low install friction with a pure-wheel distribution. Active maintenance with a release dated 2026-08-13. Requires Python 3.10 or later and brings in 8 runtime dependencies including numpy, lxml, and cmake for C code compilation support.
License in practice
License treatment is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms before use in proprietary or restricted contexts.
Quickstart
pip install fmpy[complete]
from fmpy import simulate_fmu, dump
fmu = 'Rectifier.fmu'
info = dump(fmu)
result = simulate_fmu(fmu)
Requires Python 3.10 or later. FMU files must be obtained separately (e.g., from the FMI cross-check repository).
Verify before relying
- Actual license terms and restrictions—metadata shows 'unclear' treatment with no SPDX or raw license field.
- Whether cmake and C compilation toolchain are required for all use cases or only for compiling C code FMUs.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — attrs, cmake, jinja2, lark, lxml, msgpack, nbformat, numpy |
| Maintenance | actively maintained — 1 days since the last release |
| First released | |
| Downloads | 210,102/month — #9,504 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fmpy-0.3.31-py3-none-any.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
mujoco-usd-converterConverts MuJoCo MJCF robot model files into…
permissive · top 15,000 on PyPI
notebookJupyter Notebook is a web-based interactive…
permissive · top 1,000 on PyPI
testbooktestbook lets you write unit tests for Jupyter…
permissive · top 15,000 on PyPI
PySpicePySpice provides a Python interface to Ngspice…
copyleft · top 15,000 on PyPI
jupyterJupyter is a metapackage that installs the core…
permissive · top 5,000 on PyPI
jupyterlabJupyterLab is an extensible web-based…
permissive · top 1,000 on PyPI
jupyter-dashJupyter Dash lets you develop and run Plotly…
permissive · top 15,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
customtkinterCustomTkinter wraps Python's Tkinter to provide…
permissive · top 5,000 on PyPI
mkdocs-jupyterConverts Jupyter notebooks and Python scripts…
permissive · top 15,000 on PyPI